Fix occasional segfault in query cache + extended protocol.
Fix occasional segfault in query cache + extended protocol.

When the query is not "cache safe", bind_msg->param_offset was not set
in Bind(). However, Execute() unconditionally uses
bind_msg->param_offset to convert bind parameters to string so that
they can be added to the cached query string and it causes segfault
because bind_msg->param_offset is a garbage. Also logic bug to
calculate bind_msg->param_offset is corrected.

Per bug#76.

treasure-data/prestogres,treasure-data/prestogres,treasure-data/prestogres,treasure-data/prestogres,treasure-data/prestogres,treasure-data/prestogres,treasure-data/prestogres