Added group and mask properties to Rigidbody component.

Group defines which collision group the body belongs to, each type has a default (DEFAULT, STATIC, KINEMATIC, TRIGGER; for dynamic, static, kinematic, triggers)
Mask defines with which other groups collisions occur. Each type has a default (ALL, NOT_STATIC_KINEMATIC, NOT_STATIC, NOT_STATIC; for dynamic, static, kinematic, triggers)

New properties available on rigidbody: entity.rigidbody.group, entity.rigidbody.mask
Updated all constants to be in pc.* namespace
Moved all constants in to rigidbody_constants.js
Refactor RigidBodySystem.onUpdate to remove _getCollisionFlags and pool contact results

Now that all bodies are in groups should be no need  for collision flags
All ContactResults are now grabbed from an object pool to replace allocations.
Update constants to match existing definitions in Bullet
Change event.fire() so that it checks for callbacks before doing allocations.
[VERSION] v0.161.0-dev
Resample down textures that are too large

Resample image based textures down to the maximum dimensions supported
by the device
Merge branch 'master' of https://github.com/playcanvas/engine
Fix previous checkin
Add graphics device function for read back pixels from current render target.
Merge branch 'master' of https://github.com/playcanvas/engine
Fix for texture upload logic.
Remove all logging on engine startup.
Remove more console logging from the graphics device.
Merge pull request #79 from playcanvas/feature/collision-layers

Added group and mask properties to RigidBody component.
[BREAKING] Texture.maxAnisotropy -> Texture.anisotropy. Device.maxSupportedMaxAnisotropy -> Device.maxAnisotropy.
Cut down on checks for setting anisotropy.
Merge pull request #101 from playcanvas/feature/collision-layers-update

Refactor RigidBodySystem.onUpdate to optimize
Deprecated ScriptComponentSystem.broadcast() and ScriptComponent.send().

Use the direct script communication: e.g. entity.script.script_name.method_name();
Merge branch 'master' of github.com:playcanvas/engine