Surface and bulk defects in hydrogenated amorphous silicon and silicon-based alloy films