Remove the needed for reversing arrays for processing
Remove the needed for reversing arrays for processing

Changed usages of push on this._buffered_msg_queue and this._msg_queue
to use unshift

https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/unshift,
removing the need to reverse the array to pop elements in fifo order

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

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