Many deploy improvements:

- Handlers can now have a pre and post method
- Sort changes in dry-run mode
- Do not load code when running in embedded mode for server and agent