Allow dynamically changing GearJoint.joint1/joint2

Also checking the type of the joints now to make sure they are either
RevoluteJoint or PrismaticJoint.
Added conversion functions and used them everywhere

For converting between pixels/meters and radians/degrees. They also do
the inversion of the y-axis and the rotation.

I tried not to change any existing conversion in this commit, but it
still fixes missing y-inversion in Box2DPulleyJoint::localAnchorB and in
all getReactionForce members.