Some minor yet important improvements.

All functions in 'actions' are now procedural, and need not be
bound to any object in order to be called. This simplifies testing.

The order of arguments specified in target_for_installation,
target_for_uninstallation and target_for_upgrade has been standardised,
as have the parameters' names.