Rework generic_z_command to build the command in linear time

This commit changes how we build the Redis protocol string for
ZUNIONSTORE and ZINTERSTORE such that we avoid reallocating
memory for the command buffer for each new key or weight
generic_z_command fixes

Use the lengths for our optional parameters, as NULL will
come through as a non null zval pointer with a zero length

Properly return the length from the redis_cmd_sstr_init function
Merge branch 'feature/z_cmd_performance' into develop