Added R.trim method and simple test. Closes #401

Uses polyfill to comply with ES3.
Merge pull request #413 from anton-rudeshko/trim

Added R.trim method and simple test. Closes #401