JSON plugin: Resolve relative paths of image layers

Relative image reference of image layers were not being resolved by the
VariantToMapConverter, leading to images not being found when the map
location didn't happen to match with Tiled's working directory.

Also made sure the path is cleaned from "./" or "../" parts.
Merge branch '0.9'
JSON plugin: Marked some member functions const
Updated link to Homebrew
JSON plugin: Updated qjsonparser to its latest master
Explicit object order with actions to change it

The raise/lower actions are currently only available in the object
selection context menu.

TODO: Make this new object drawing order behavior optional.

Sponsored-by: Ben Wales
Introduced shortcuts for raise/lower actions

* PageUp => raise
* PageDown => lower
* Home => raiseToTop
* End => lowerToBottom

Previously, PageUp and PageDown changed the selected layer. Those have
been moved to Ctrl+PageUp and Ctrl+PageDown.

Those shortcuts in turn used to change the currently selected map. This
is also possible with Ctrl+Tab and Ctrl+Shift+Tab, but to make up for the
lost shortcuts, Alt+Left and Alt+Right were added.
Introduced object group drawing order attribute

This attribute allows specifying per object group whether its objects
should be drawn top down (from top to bottom) or in index order
(which enables manual ordering).

This change also fixes an issue where new objects could be invisible
during placement due to being drawn below other layers.
JSON plugin: Store the draw order for object groups

Also fixed the error reporting of the VariantToMapConverter and fixed an
issue when reading .js files that are modified with a text editor that
adds a trailing newline (by trimming any trailing whitespace).

And simplified cleanup a little using QScopedPointer.
Fixed compile with MSVC 2010

MSVC 2010 math header does not come with M_PI.
Fixed handling of per-tile external image references

Previously Tiled would load maps with per-tile external image references,
but on saving the map all images would become embedded.
Use a template to share the algorithm of TileLayer::region

This way, TileLayer::tilesetReferences can trivially use the same
optimized loop and it also becomes available for searching for other
conditions.
Allow changing the drawing offset of a tileset

Previously it was only possible to set this offset in the New Tileset
dialog, which is a little annoying for a setting that can really use
some visual feedback.

Also fixed updating of tileset name in the Properties dock on undo/redo.
Fixed typo in copyright headers
Replaced Q_WS_MAC with Q_OS_MAC

Q_WS_MAC was removed in Qt 5, so some Mac-specific code was not getting
compiled in. This change fixes icons appearing in menus and the
handling of external commands on Mac OS X.
Merge branch '0.9'
Added an option to disable building of the Python plugin

Having some issues with it on Mac OS X currently, which I'll look into
another time.
Fixed draw order for duplicated object layers
Allow creating empty tilesets and adding images later

Sponsored-by: Jamie Rocks
Updated the New Tileset dialog to reflect individual images option

The dialog now features a combo box where the user can choose between
creating a tileset based on a tileset image, or a tileset that is simply
a collection of images. The images still need to be added later using
the '+' button in the tileset toolbar.

The drawing offset is no longer configurable using this dialog. It can
be changed in the tileset properties instead.