refactors the factory mechanism
- introduces interface Factory
- moves all factory code in package factory
- writes a test

git-svn-id: svn://scm.gforge.inria.fr/svnroot/spoon/trunk/spoon-core@2366 b1f50995-73fd-43b8-8ca2-fbc405a04e82