This adds protections from A) an unsolicited event leaving the SPI not
resumed when there is an opcode pending because a command eas sent
(solicitedResponse is true) 

B) A data message arrives in the event handler after SpiResume is called
and before the loop can exit. The being processed when there was not a
call to SimpleLinkWaitData an memcopying to a invalid return

C) A data message arrives that hase bogus length

D) Return the length of the read data. This fixes nvmem_read to return
the length read as documented

Fixed all nvmem_read read to use comparison to length for valid check

Changed size of SimpleLinkWaitData fromlen to long to be consisant with
returning the actula lengh read from sockets. Adjusted nvmem_read
accordingly



Reformated