Effects of functionality and textural characteristics on the removal of Cd(II) by ammoniated and chlorinated nanoporous activated carbon