Fix some build issues
Add server library module

With this change, the engine module might become the client module. Any
shared code will be probably be put into a new 'net' module or similar.