as far as i am aware, clearing customs, immigration etc will all be done at manchester on arrival, not in Newark (as that would only be classed as a domestic flight).
as for security, that will be cleared in Boston, however i must admit i have no idea about the transfer in EWR, and as to whether you will beed to go through (main) security again.
however, as always, i stand to be corrected.