Add support for loadable modules

Add support for loadable modules which each go in their own shared library.
We'll use this to implement support for special boards.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>