Small fixes previously discussed in forum

3 Small fixes: 1) subscription is now recorded before the subscription message is issued to the server, 2) subscription is removed locally after unsubscription message is issued to the server, 3) in global unsubscription the map is cleared after issuing all the unsubscription messages.

Regards,
Alejandro.