Added String.prototype.trim() method.

This will remove spaces on the front and end of string, until all
spaces in the begining/ end are gone.
Updated tests.