Fixed crash when starting the 'mouse' example

Since the world is not known during initialization but only once things
are being created, the joints also do not know the value of
pixelsPerMeter during initialization.

The solution implemented here delays the creation of a b2JointDef
instance (along with any necessary conversions) until the point where
the joint is actually being created.

Only the MouseJoint has been fixed, the other joints would have to be
adapted in the same way.
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.

Also fixes changed signal in Box2DDistanceJoint::setLocalAnchorA.
Fixed up the FrictionJoint

Made sure it doesn't crash when anchors are set before the joint is
created. Separated defaults for localAnchorA and localAnchorB.
Updated GearJoint for consistency

It wasn't crashing, but this just makes the creation style the same as
the other adapted joints.
Fixed up the MotorJoint

Don't crash when setting linearOffset before joint creation.

Also, when linearOffset and angularOffset are set before joint creation,
their values now actually take effect whereas before they were ignored.
Fixed up the PrismaticJoint

* Don't crash when initialized before creation
* Added PrismaticJoint.referenceAngle
* Changed PrismaticJoint.axis to PrismaticJoint.localAxisA
Fixed up the PulleyJoint

* Don't crash when initialized before creation
* Added defaulting to center of mass for local anchors
* Added defaulting of lengthA/lengthB to the difference between local
  anchors and their respective ground anchors
Fixed up the RevoluteJoint

* Don't crash when initialized before creation
* Added RevoluteJoint.referenceAngle
* Fixed default behavior of localAnchorB in case localAnchorA is set
  to a value different from the center of mass of bodyA (also applied
  to FrictionJoint and PrismaticJoint)
Fixed up the RopeJoint

* Don't crash when initialized before creation
* Added defaulting to center of mass for local anchors
* Added warning when maxLength is too small (according to Box2D's
  documentation)
Fixed up the WeldJoint

* Don't crash when initialized before creation
* Separated defaulting for localAnchorA, localAnchorB and referenceAngle
Fixed up the WheelJoint

* Don't crash when initialized before creation
* Separated defaulting for localAnchorA, localAnchorB and localAxisA
* Added inverting of Y axis for localAxisA and normalized it, since
  non-normalized values were doing strange things.
Added some missing mapping functions to Body

* Body.getLocalCenter()
* Body.toWorldPoint(localPoint)
* Body.toWorldVector(localVector)
* Body.toLocalPoint(worldPoint)
* Body.toLocalVector(worldVector)

For some of these of course also Item.mapToItem and Item.mapFromItem
could be used, but I don't think it hurts to have them anyway.
Merge pull request #61 from bjorn/body-functions

Added some missing mapping functions to Body
Merge pull request #56 from bjorn/joint-crash

Fixing crashing of joints on initialization
Added missing include

Fixes compile since qWarning is used in this file.
Replace QPainter with Scene graph render in DebugDraw item
Merge pull request #64 from folibis/debugdrawgl

Change render system for the DebugDraw item to scene graph
Use GL_TRIANGLE_FAN instead of GL_POLYGON

Should fix compile for systems with only OpenGL ES2.

Closes #68
Add World.enableContactEvent property. Remove Fixture.onContactChanged event. Update examples because of these changes.
Merge pull request #53 from folibis/contacts

World.enableContacts