Properly sync PacketWriter's queue

by using take()/interrupt() instead of poll(). Fixes a race condition
where nextpacket() would wait for a notification that would never
arrive, because all all put(Packet) calls are still blocking.

SMACK-560
Make sendPacket throw NotConnectedException

also use XMPPConnection.sendPacket() instead of
PacketWriter.sendPacket() in XMPPTCPConnection.
Update javadoc for (get|set)CustomSSLContext()
Fix NPE in JavaxResolver

Attributes.get(String) could return 'null'. Take care of that case.