Bug 909281 - Add some strongly-typed conversion functions for margins and use them in RecordFrameMetrics. r=BenWa