mark functions with printf() semantics with GCC format attribute

This enables format string checks for CZMQ functions that take
variable number of arguments in a manner similar to printf().

It also adds a few casts for places where size_t is passed
to functions with printf like syntax. There is a modifier to allow
use of size_t (%zd) but it is not portable to all operating systems
and compilers.

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>