Performance optimizations and memory management

Added some benchmarks to secure channel and played around with improving its performance, also started using a sync.Pool for message buffers.
dagwriter's gone. will need to rebase this PR on top of new master after #244 lands