MPs have approved a ban on disruptive protests outside animal testing labs and other "life sciences infrastructure".