Thingsquare msp430x patches

This pull request contains a number of improvements and bugfixes for the MSP430x emulation in MSPsim. The code has been tested with mspgcc  4.7.0, 4.6.x and IAR and with the latest Contiki. The code has been verified against MSP430f5438a hardware using mspdebug' step instruction.