Fixed send() by properly handling all cases.
Improved logging.
Introduced the capability of inserting buffers at a specific index.
Fixed insertion of frame header buffer at the right index.

In case the lease is not empty, the frame header buffer must not be
inserted at index 0, but just before the frame body buffer.