Fixed up the DistanceJoint

The main change is to not make it crash when its anchors or length are
set before it is being created. In addition, the choosing of defaults
for localAnchorA, localAnchorB and length has been improved.