gui: rewrite theme loading code

- Reduce code duplication for parsing of include files
- Fix crash when styles and templates from included files are referenced
- Fix bug with path concatenation if more than one file is included

Change-Id: I06cd720188df272180fb359097afd73a85952fa8
2 files changed