Load huginn_scheduler first before each thread starts to auto-load files.

This should fix #501.
Call load_types_in after necessary class methods are defined.

Loaded subclasses need them.

This should fix #502.