Move exceptions and events to global package

Move exception and event classes to a package outsite .server because these exceptions
will be used by the client aswell.
Add basic packet framework

Add basic packet framework. Allow packets to be received and sent; Allow
custom packet creation.