Efficient Learning of Fast Inverse Kinematics with Collision Avoidance