Use twisted.trial in twisted example so assertions can be performed inside twisted callbacks.

Add httplib example.