Refactored Properties using Object.defineProperties (#120)
Refactored Properties using Object.defineProperties (#120)

* Refactored Properties using Object.defineProperties

Refactored Properties using Object.defineProperties as seen here

https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/defineProperties

This reduces the javascript code by removing repeated code. This will
have a impact on overall file size.

Signed-off-by: Tadhg Mulkern<9edce49b20036e643c13b79e2a6e449711c9dfdc@gmail.com>

* Added additional cleanup of code

Added a piece of code to removed the need for all the Typed Array
checks, base on this method

https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/ArrayBuffer/isView
and from the Stackoverflow answer
https://stackoverflow.com/questions/15251879/how-to-check-if-a-variable-is-a-typed-array-in-javascript/29651223#29651223

eclipse/paho.mqtt.javascript,eclipse/paho.mqtt.javascript,eclipse/paho.mqtt.javascript