Engine: safer version of AGSPlatformDriver::ReplaceSpecialPaths()

Added output buffer size to parameter list.
Removed Android, iOS and PSP implementations, because they duplicated the one in the base class.
Linux: use XDG specification for special paths

As suggested by Edward Rudd.
Mutex locking guard

Added MutexLock class to prevent deadlocks. Replaced UPDATE_MP3 and UPDATE_MP3_THREAD macros with functions.
Merge pull request #115 from ivan-mogilko/fix_special_paths

Fix ReplaceSpecialPaths() and use XDG specs