Service Wrapper

Finished coding and preliminary testing of service wrapper on Windows.

Added a DEBUG preprocessor directive which enables exception messages
from the wrapper around Main.

Fixed some undefined behaviour that was encountered with respect to
memory allocation/deallocation when passing strings to native APIs.