The role of the fouling and clogging layer in the removal of heavy metals from wastewaters in membrane bioreactors