peer: ensure queueMsg won't create deadlock if peer shutting down
peer: ensure queueMsg won't create deadlock if peer shutting down

This commit adds some additional measures to ensure that a call to
queueMsg while the peer is shutting down won’t result in a potential
deadlock.

Currently, during shutdown the outgoingQueue channel is attempted to be
cleared by he writeHandler, however adding an additional select
statement serves as a mother layer of defense from nasty dead locks.

LightningNetwork/lnd,LightningNetwork/lnd,AndrewSamokhvalov/lnd,ddustin/lnd,bryanvu/lnd,AndrewSamokhvalov/lnd,aakselrod/lnd,bryanvu/lnd,aakselrod/lnd,ddustin/lnd