A multinational mining company has been accused of launching "a direct assault on democratic governance" by suing El Salvador for more than US$300m (£179m) in compensation, after the tiny Central American country refused to allow it to dig for gold amid growing opposition to the exploitation of its mineral wealth.