mcreq_basic_packet(): check config != NULL

And return an error otherwise. This really should not be necessary
(users should ensure a valid connected instance exists), but many
existing SDKs test these scenarios and this causes a crash in those
situations.

Change-Id: Icc8f95a3631b55459f6b14c330e87bcd3aaac296
Reviewed-on: http://review.couchbase.org/36394
Reviewed-by: Brett Lawson <brett19@gmail.com>
Tested-by: Mark Nunberg <mnunberg@haskalah.org>