For the deformed hip this is the solution ...
- Select your calf bone / lower leg bone
- Bone Constraints Properties panel
- Change Pole Angle to -90 degree.
Other Observations Additionally, I have observed that your rig would greatly benefit from collar bones which were missing.