Cleaning: Split core.php in two parts

[ Previous state ]

core.php loads the configuration, the core libraries and then provides
a lot of helper functions accumalated at the Espace Win era from 2001.

[ Current state ]

* core.php loads the configuration and the core libraries
* GlobalFunctions.php contains the global functions

[ Still to do ]

* Remove from GlobalFunctions.php anything we don't use
* Consider to create static classes to store families of functions
Adding Collection::getAll() and Collection::count()

[ Feature description ]

The Collection classes should now implement two new methods:

* count() — Gets a count of the documents in the collection
* getAll() — Gets all the documents from the collection

[ Implementation for FilesCollection and MongoDBCollection ]

* FilesCollection::count() counts the number of *.json files in
  the collection directory, getAll() returns a Generator to read
  each directory *.json file.

* MongoDBCollection::count() calls MongoCollection::count(),
  MongoDBCollection::getAll() returns an Iterator which calls
  systematically the MongoCursor Iterator, except to return
  the current object, for which it calls MongoCursor:Current
  but then returns an instance of CollectionDocument.

[ Unit testing ]

The collections tests cover these new methods.