Extract mask layer setup from refresh control init block

I think it clarifies the layering aspect of the mask CAShaperLayer.
Fix CGPathRef memory leak

I wasn't releasing the CGMutablePathRef that was created for the mask
layer. This does require extracting the setup from a local code block,
so oh well.