Update p12n extract and view (remove metro, OS portability)

p12n_extract:
* remove Metro control
* remove concatenations for paths, use os.path.join and os.sep
* fix coding style consistency (parenthesis, quotes, and instead of &)

Remove Metro from view
Merge pull request #266 from flodolo/metro_p12n

Update p12n extract and view: remove metro, improve OS portability
Add son & mai locales to Gaia 2.0
Issue #222: formal API support
* Catch api/* urls
* api/v1/foo/bar/... urls are parsed as an API call containing parameters. Extra parameters can be added as GET ones.
* New API class to manage API requests. 6 API services implemented:
    - entity: Return all translations for an entiry (equivalent to /string/ Json API)
    - locales: Return the list of locales for a repository
    - repositories: Return the list of repositories supported by the API
    - search: Search on repositories (equivalent to current Json API on main page for strings and entities)
    - tm: Translation memory, similar to the Amagama service
    - versions: returns the different versions of the API with their status (beta, stable, deprecated)
* API public methods (none static):
    - getParameters()
    - getExtraParameters()
    - getService()
    - isValidRequest()
    - invalidAPICall()
* Invalid queries return a 400 response and a json object with details on why the request is invalid
* New Project class to make key data available everywhere in the application without using globals
* Project public methods (all static):
    - getRepositories()
    - getRepositoriesNames()
    - getGaiaRepositories()
    - getDesktopRepositories()
    - getRepositoryLocales()
    - getReferenceLocale()
* Updated Strings class with these static methods:
    - levenshteinUTF8()
    - levenshteinQuality()
* Refactored all search views to be MVC and separate data generation from presentation (needed to redirect JSON API calls to new v1 API services)
* API changes:
    - Entity service returns an empty json array for invalid entities + filters out {ok} strings for mozilla.org
    - The "Strings and entities" json source is no longer supported
* Tests for all public methods
* www.mozilla.org in select box is now displayed as mozilla.org
Merge pull request #269 from pascalchevrel/issue-222-new-api

Issue #222: formal API support
Issue #267: remove Gaia 1.1 support + fix VersionControl::hgPath() to support Gaia 1.4
Merge pull request #268 from pascalchevrel/issue-267-remove_gaia_1.1

Issue #267: remove Gaia 1.1 support + fix VersionControl::hgPath() for Gaia 1.4
API: fix PHP warning on /api/ call (without parameters)
Merge pull request #271 from flodolo/fix_emptyservice

API: fix PHP warning on /api/ call (without parameters)
Project Class: add method to check if repo is supported

Clean up code in l10n-init, remove duplicated code in checkvariables.
Merge pull request #272 from flodolo/l10n_init

Project Class: add method to check if repo is supported
Document constructor of API class
Merge pull request #273 from pascalchevrel/master

Document constructor of API class
Project class: add method to manage locale exception, update Gaia locales

* Move code from Bugzilla to manage exceptions in a single place in the code
* Clean up some views:
  * accesskey: use ```getRepositoryLocales```, no need for Gaia hack (no accesskeys in Gaia).
  * changelog: fix markup error.
  * checkvariables: use ```getLocaleInContext```.
  * gaia: remove Serbian hack, tweak ```l10n-init.php``` to return the list of locales for Gaia in $all_locales.
  * productization: fix comment style.
* Update Gaia locales (master, 1.4): en-GB, fa, mr, nb-NO, sw.
Merge pull request #274 from flodolo/cleanup_bugzilla

Project class: add method to manage locale exception, update Gaia locales
Issue #32: provide a client-side filtering system for search results of desktop strings
* refactor main view to be a bit more MVC
* Update Jquery reference to latest stable 1.x branch
* Show a row of button filters above the results
* Javascript to build the filters is created from the search results
Merge pull request #275 from pascalchevrel/issue-32-limit-search-results-per-product

Issue #32: provide a client-side filtering system for search results of ...
Fix a dataprovider method name to not start with test, only real tests can start with that (notice in atoum that one test is not testing anything ;) )
Merge pull request #276 from pascalchevrel/test_fix

Fix a dataprovider method name to not start with test, only real tests c...
(no bug) Cleanups and speed/memory improvements:
- use isset() instead of array_key_exists() when possible as it is faster
- unset large data sets manually instead of waiting for end of script GC (improves memory but also perfs)
- use new Project class methods whenever possible