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

Uses MDN polyfill to comply with ES3.