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
Merge branch '4.0'