Fix Gradle build for Windows

- apply UTF-8 encoding for all Java compile tasks
- strip Windows path separators from class file paths