Brooklyn man charged with raping ex-girlfriend, murdering her friend