Avoid 64 bit mul+div in platform_timer_get_diff_us() when timer rate is 1 MHz.
Now clears FIFO empty interrupt mask in DCD_WriteEmptyTxFifo() when transfer completes.

This fixes a problem whereby outputting to the USB UART when the host is
connected but the USB UART is not open would cause the interrupt
handler to be called continuously so it would consume 100% of the CPU.
Avoid 64 bit divide in cmd_systimer_get().
Avoid losing time when cmn_systimer_counter exceeds PLATFORM_TIMER_SYS_MAX.

Setting cmn_systimer_counter to zero when the systimer exceeded
PLATFORM_TIMER_SYS_MAX would cause time to jump backwards if
cmn_systimer_counter was already greater than PLATFORM_TIMER_SYS_MAX.

So now, instead of zeroing it, we subtract PLATFORM_TIMER_SYS_MAX.
Correct value of PLATFORM_TIMER_SYS_MAX for lua long builds.

It was being set to ( ( 1LL << 31 ) - 2 ) which only used 31 bits when 32
are available. By setting it to ( ( 1LL << 32 ) - 2 ) the range of the timer
is doubled to around 4295 seconds. Note that time values greater than
approx 2147 seconds will have the top bit (1 << 31) set and so will appear
to be negative as all numbers are considered to be signed.
Merge pull request #39 from smartavionics/mb-misc-mods

Mb misc mods