A lot fixes for NRF51822. Make pyOCD usable with nRF51 CPU.

- add options for gdb_server.py: SoftDevice flash protection, don't break at hard fault handler, correct resume procedure, add extra monitor command.
- mask interrupt when stepping. Required for NRF51. Otherwise GDB server can't step if any interrupt occured during halted state. In case of nrf51 with enabled BLE it happens all the time.
- fix nrf51 reset(), resetStopResume() functions.
- add nrf51 specific gdb_server server.
reset() enables hardware reset pin and then trigger it, so CPU will leave debug mode and run:
```python
    def resetn(self):
        """
        reset a core. After a call to this function, the core
        is running
        """
        #Regular reset will kick NRF out of DBG mode
        logging.debug("target_nrf518.reset: enable reset pin")
        self.writeMemory(RESET, RESET_ENABLE)
        #reset
        logging.debug("target_nrf518.reset: trigger nRST pin")
        CortexM.reset(self)
```

resetStopOnReset() halt CPU and trigger software reset that keep CPU in debug mode so CPU will halt in default handler.
```python
    def resetStopOnReset(self):
        """
        perform a reset and stop the core on the reset handler
        """
        # read address of reset handler
        reset_handler = self.readMemory(4)

        # halt on reset the target
        self.halt()
        # set a breakpoint to the reset handler and reset the target
        self.setBreakpoint(reset_handler)

        #Soft Reset will keep NRF in debug mode
        self.writeMemory(DEMCR, VC_CORERESET)
        self.writeMemory(NVIC_AIRCR, NVIC_AIRCR_VECTKEY | NVIC_AIRCR_SYSRESETREQ)
        
        # wait until the bp is reached
        while (self.getState() == TARGET_RUNNING):
            pass
        
        # remove the breakpoint
        self.removeBreakpoint(reset_handler)
```