Big refactor, feature enhancements and stability fixes

As per the commit message this is a fairly big refactor of the code base.
The major enhancements include:

- A full implementation of Cancel behaviour with granular cancellation time (downloads are now chunked so can be cancelled before completion).

- Progress and retry notification

- Rework of the handler hierarchy to support a single base class and remove instanceof checks.

- Fixed some small stability issues (unhandled exception, connection issues on network switch).

I have spent some significant time testing these changes (in mixed network environments) and hope they meet with your approval.