refactored out duplicate Dimensions methods with define_method

As in issue https://github.com/shoes/shoes4/issues/549

It is still hard to read, and I can see there is still some duplication that can be designed out.

But I think before trying to refactor this out into something like Axis objects. I think it would be good to try and refactor all the nil checks at the beginning of these methods. Then it will easier to see exactly what they.

I was thinking of using a NullObject for the default values when initializing a new Dimension.

Thoughts and help would be great