Add mock https servers implementation

Based on python twisted. Tried to work with condition variables with little
success.
Add auth test