Bug 732971 - Create a new layer type for subdocuments with a resolution. r=tn

The new nsDisplayResolution layer type is created for any subdocument whose
presShell specifies a non-1.0 resolution. This is specifically needed for
platforms such as Android and Metro, where the presShells corresponding to
the tabs (which have non-1.0 resolutions) are not the root presShell.
Bug 732971 - For Fennec move the resolution from the top-level presShell to the content presShell. r=BenWa

The bulk of this patch is fixing up pieces of code that infer the resolution
as the inverse of the scaling transform on the root layer. This used to be
how various bits of gfx code obtained the resolution, but now that we can set
the resolution on the actual presShell that contains the content, we can also
just read the resolution from the FrameMetrics directly.
Bug 929011 - Simplify path and transform parsing. r=dholbert