First cut of zcurve, plus some cosmetic fixes

First cut of zcurve class, which implements http://curvezmq.org/.
Also some minor code cleanups.