Effects of substrate types on the transformation of heavy metal speciation and bioavailability in an anaerobic digestion system.