Melo scores 31 in return as Knicks rout Nets