Issue 9699 - Implement generic strip/stripLeft/stripRight functions

http://d.puremagic.com/issues/show_bug.cgi?id=9699

A re-implementation of https://github.com/D-Programming-Language/phobos/pull/1201.