Use macros to make code cleaner

Use #ifdef in a single place for pull/push functions.

Signed-off-by: Frediano Ziglio <freddy77@gmail.com>
Separate states in push/pull SSL function.

Historically these functions handled initialization and normal data.
However is quite different as during initialization TLS data is encoded
in TDS packets while during normal data TDS packet are encrypted as TLS
data. This leaded to more complicated function and slightly less
performance.
Now these two function were split in two, ont part for login and one part
normal data.

Signed-off-by: Frediano Ziglio <freddy77@gmail.com>