Projections of singular varieties and Castelnuovo-Mumford regularity