More than 40 US states have filed a lawsuit accusing pharmaceutical firms of conspiring to artificially inflate the cost of common medicinal drugs.