add tests and fix for issue 212

It turns out some commercial images use integer x and y resolution, when the spec states they are rational. With this pull request Pillow can handle both tag value types.