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`

I did not write any tests for `ItemViewer`, yet.