Extracting the best width value calculation as a reusable static method (`getClosestValue`).

It is going to be reused to compute the best pixel ratio.
Reformatting core tests
Testing `determineAppropriateDevicePixelRatio`
Implementing `determineAppropriateDevicePixelRatio`
Updating the pixel ratio value before each loop, in case the zoom level changed meanwhile.
`availablePixelRatios` documentation.
Merge branch 'feature-availablePixelRatio' of https://github.com/oncletom/Imager.js into oncletom-feature-availablePixelRatio
Changed Ruby version
Add an onImagesReplaced event

- event gets called after Imager.js replaces the src of images
- add test for onImagesReplaced callback
documentation for the onImagesReplaced callback