Sync locales for Firefox OS pages
Merge pull request #142 from TheoChevalier/firefox-os-pages

Sync locales for Firefox OS pages
Partners page is not critical at the moment (better get devices page complete)
Move template selection in class, add tests

* Moved template selection logic in Project::selectView, added tests.
* To get global status for a file is not necessary to provide a locale code anymore. If locale code and json are set, returned JSON record include only the requested locale (issue #141).
* Cleaned up $_GET variable, when they're available from inc/init.php ($json, $filename, $website).
* Global status: print an error (and return 400 in JSON mode) if website+file is not supported or file does not exist.
* List locales for project: return code 400 if list of locales is empty.
* Renamed local $json variables to $json_data to avoid conflicts with global var $json.