Remove relative imports and added a setup.py and version.py.

Signed-off-by: Martin Raspaud <martin.raspaud@smhi.se>
Better handling of thread pool and some error handling.

 * semaphore is now acquired before thread creation
 * unknown format error doesn't crash thread
 * generate_composites now accepts hooks

Signed-off-by: Martin Raspaud <martin.raspaud@smhi.se>