Implement the nokia.messaging localmsg server

This localmsg server is used to receive SMS messages as an alternative to the standard J2ME SMS API.
We can implement it better than the standard J2ME SMS API because it doesn't support SMS ports (at least I haven't found any MIDlet that tries to read the port from the "GetMessageEntity" message).
As part of this pull request, I've also updated codec.js to raise exceptions when a field isn't present.
I've added a simple test to check the "ProtocolVersion" and "SubscribeMessages" methods (that are testable using a simple testlet).
I've updated the SMS MIDlet to use both the J2ME API and the nokia.messaging server. I've rewritten the MIDlet in a "testable way". It should be possible to test it by writing in the input fields and clicking on the "Receive SMS" button, but I haven't been able to do it using casperjs (maybe we can do it as a followup, I'll file an issue).
"type" was my guess, but I'm not sure about what the name is actually supposed to be.