Fix Str::contains(), startsWith() and endsWith() with empty needles.

The behavior in these cases has been unified:
- return false
- no longer produce warnings
Optimize Str::endsWith()
Docblock and code uniformization in Str class