Input Buffer algorithm changed

The algorithm charged with resizing the input buffer size has been reworked. The new algorithm now takes less steps to shrink the input buffer to an appropriate size. This has improved memory usage under operation, and leaves Tigase XMPP Server with a smaller footprint when idle.