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, avoid warnings for non existent website or locale.
* List locales for project: return code 400 if list of locales is empty. Don't display list of supported locales for website if the file is not valid.
* Renamed local $json variables to $json_data to avoid conflicts with global var $json.
nit: add empty line before return for consistency