Fix entry points.
Fix packs.unload action.

Python actions now run in a separate process which mean we need to establish
the database connection inside the action.
Update packs.unload action to also delete SensorType, TriggerType and Trigger
db objects for the pack which is being removed.