Weighted Sobolev spaces and regularity for polyhedral domains