slight modifications to iiif-viewer pull request

@eliotjordan This has a few modifications to your pull request including:

- formatting on javascript (following Airbnb Styleguide)
- move preferred viewer logic to a new class `ItemViewer`
- also fixes a bug where a results view from a spatial search starts with a bounding box on map