JSON: cleanup and avoid code duplication in decoding functions
JSON: cleanup and avoid code duplication in decoding functions

* Introduce macros for checking types and null values.
* Return decoding error for Guid and DateTime null values.
* Do not set the destination variable for null values, since the calling
  function is responsible for initalizing it before calling.
* Allways CHECK_TOKEN_BOUNDS before GET_TOKEN.

JGrothoff/open62541,jpfr/open62541,open62541/open62541,jpfr/open62541,StalderT/open62541,StalderT/open62541,open62541/open62541,open62541/open62541,JGrothoff/open62541,StalderT/open62541,JGrothoff/open62541,StalderT/open62541,jpfr/open62541,open62541/open62541,jpfr/open62541,JGrothoff/open62541