Build ajax options for select2 directive.
Reorganize dependencies.
Add specs for the custom select2 directive.