Use ol.Projection#.getMetersPerUnit()

As a follow-up to #815, this change makes
ol.tilegrid.createForProjection work in cases where a Proj4
projection does not have units set. For better code readability,
a new variable is used when calculating the resolution.
Merge pull request #816 from ahocevar/tilegrid-units

Use ol.Projection#getMetersPerUnit(). r=@tschaub