Add API repository backed by Faraday
Instrument faraday
Add Faraday middleware for X-Request-Id header
Faraday response middleware to parse link headers
Allow API repository timeouts to be configured
Add retry middleware to  API repository
Switch API repository to use nested exception

We can switch this to use exception causes once we can upgrade
to Ruby 2.1.

See http://devblog.avdi.org/2013/12/25/exception-causes-in-ruby-2-1/
refactored collapsable.js to be a require module
moved to correct folder and modified loading to work correctly
links added to test analytics on downloading files
viewport orientation change fix for iPhone
Fix silly JS bug for missing MBP that I should have tested.
Extract factory for building faraday connections
One repository per persistence layer

Repositories should encapsulate different persistence layers not
different strategies to access the same persistence layer. For that
reason I have removed ActiveResource and replaced it with Faraday as
this will provide us greater flexibility going forward.

Additionally I have renamed the Repositories to specifically call
out the persistence layer they are providing an interface to.