Removed boost::algorithm::trim dependency.

Replaced it with our own implementation.