Preparation of nanoparticulate metal oxides and hydroxides and their application in the removal of toxic heavy metal ions from waste water