Cleanup ws_string type implementation

This PR is a cleanup for the ws_string type implementation,
it removes whitespace, simplifies some algorithms and does
one major change: The return type of
ws_string_set_from_raw(). It adapts the calls to
this function, though.

This was pair-programmed with @manuelmessner.