Update Shape to use Dimensions

This updates Shape to rely on Dimensions, like everything else. Addresses #730 and #485. I think some of the positioning code may be off on the backend now (see samples/sample31.rb), and I'll do some refactoring of the backend class while I'm in here, but this is mostly working.