Ensure last mqtt node turns off the lights before closing
Ensure last mqtt node turns off the lights before closing

The mqtt-broker node disconnects when the last node using it
is closed. But that node-close was not waiting for the disconnect
to complete. This led to a race-condition where the using node
was recreated and started trying to use the broker node whilst it
was still disconnecting.

ioglue/ioglue,retailos/node-red,xively/habanero,kanki8086/node-red,giovannicuriel/mashup,PaGury/node-red,rdrm2014/node-red,wajnberg/node-red,knolleary/node-red,knolleary/node-red,dbuentello/node-red,ddm/node-red,wajnberg/node-red,giovannicuriel/mashup,kanki8086/node-red,dojot/mashup,estbeetoo/beetoo-controller,kanki8086/node-red,knolleary/node-red,PaGury/node-red,namgk/node-red,estbeetoo/beetoo-controller,ddm/node-red,augustnmonteiro/skills-visual-programming,Kazuki-Nakanishi/node-red,kanki8086/node-red,rdrm2014/node-red,xively/habanero,giovannicuriel/mashup,redconnect-io/node-red,node-red/node-red,knolleary/node-red,ddm/node-red,btsimonh/node-red,Kazuki-Nakanishi/node-red,dojot/mashup,btsimonh/node-red,xively/habanero,Kazuki-Nakanishi/node-red,dojot/mashup,rdrm2014/node-red,node-red/node-red,dojot/mashup,HiroyasuNishiyama/node-red,wajnberg/node-red,HiroyasuNishiyama/node-red,ioglue/ioglue,MaxXx1313/my-node-red,MaxXx1313/my-node-red,node-red/node-red,MaxXx1313/my-node-red,retailos/node-red,redconnect-io/node-red,augustnmonteiro/skills-visual-programming,mw75/node-red,rdrm2014/node-red,namgk/node-red,ioglue/ioglue,mw75/node-red,PaGury/node-red,HiroyasuNishiyama/node-red,dbuentello/node-red,btsimonh/node-red,MaxXx1313/my-node-red,mw75/node-red,estbeetoo/beetoo-controller,Kazuki-Nakanishi/node-red,dbuentello/node-red,mw75/node-red,retailos/node-red,xively/habanero,augustnmonteiro/skills-visual-programming,wajnberg/node-red,ddm/node-red,redconnect-io/node-red,augustnmonteiro/skills-visual-programming,giovannicuriel/mashup,redconnect-io/node-red,PaGury/node-red,estbeetoo/beetoo-controller,retailos/node-red,dbuentello/node-red