Properly sync PacketWriter's queue

by using a custom ArrayBlockingQueueWithShutdown. 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.
Move duplicate code into XMPPConnection

from XMPPTCPConnection and XMPPBOSHConnection.
Add newlines to smack-core/build.gradle
Don't make non-core packages a fragment bundle

as there exists no longer a dependency from smack (now smack-core) to
smackx (now mostly smack-extensions). Therefore this approach is no
longer needed.

SMACK-343
Fix appendix in smack-core

Now that we do not longer use the appendix for the subproject
name (91fd15) we need to set instead of appending the appendix in
smack-core.
Add additional log statements to disconnect()
Synchronize PacketWriter shutdown

try the best to send the queue elements and the closing stream element.