Ik rotation Deformation Problem
There are couple of problems in your file.

First the IK bones needs to have the deform property disabled as shown below:



Second, you need to adjust the pose position to be your rest pose to avoid bad bone roll values. To do this, switch to pose mode select the whole armature bones by pressing A then hit the space bar and write Apply Pose as Rest Pose as shown below:



Last thing is parenting your mesh to your armature. To do this, go to object mode, select your mesh first, then select your armature with right-click, then hit ctrl+P and choose With Automatic Weight and that's it, the mesh will be nicely deformed and parented to the armature as shown below:



The updated .blend file can be found here: