SWC-248: support code preview client-side
do not show code if no preview was available (or if there were any other problems)
use contenttype instead of extension (in most cases)
refactor preview widget, and wrap request builder so that it can be mocked
small refactor
add PreviewWidget tests (and RequestBuilder mock helper)
Merge pull request #212 from jay-hodgson/develop

set content type based on stream using the new single FileHandle creation method
SWC-248: more work for previews (csv and plain text preview output types)
SWC-248: work for previews
fix test after merge
content type change
same-origin policy issue. have filehandle servlet act as an http proxy