str: Fix oops in lstrip + rstrip with empty strip string.

The result was set to the empty strip string, instead of the input string. I
also adjusted the input checks in both lstrip and rstrip and commented why
the result is set to the input in both cases.
Add str::strip, which does lstrip and rstrip.