Refactor nasty DimensionsCalculator. Make usage of Context.obtainStyledAttributes. Fix tests by introducing LayoutHeightWidthAwareShadowTypedArray