Ensure the application logs are created in a writeable location.

- Add a new function to get application preferences directory and expose it to scripting.
- Change Editor to save/load configuration file from the application preferences directory.
- Standardized the location of log files generated by Urho3DPlayer and samples. Ensure it is created in a user writeable location to prevent application locked up during closing.