CFHTLenS: the environmental dependence of galaxy halo masses from weak lensing