resolves #897 define JAVASCRIPT_PLATFORM constant

- define JAVASCRIPT_PLATFORM constant to identify runtime environment for Opal
- change File.read method to switch on JAVASCRIPT_PLATFORM constant
- implement read operation on SpiderMonkey
- minor code cleanups