Caching in Filename class.

1. Implement caching of `stat` function call in `Filename` class to
   reduce the number of calls to that function.
2. Add some Windows API related stuff in `String` class and `Filename`
   class, even if we don't support that platform yet.
3. Remove unncessary includes.