AggregateDependency.try_binding: work only if not yet valid

Avoids a useless call to get_all_service_references() and a copy/filter
of a list
Small test code cleanup

Removed an unnecessary variable in a test
Bundles imports list sorted with bisect

* Speeds up unget_service(), which seems to have been the last time hog
* Better memory handling: if a bundle import list is empty, it is
  removed from the registry
* get_bundle_registered/imported_services() now returns an empty list
  instead of None if a bundle does not register/use any service