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
Merge pull request #1218 from mojavelinux/issue-897

resolves #897 define JAVASCRIPT_PLATFORM constant