Cut password at first NUL byte for PLAIN

This is a workaround for clients in the wild (notably ns_server) that
are currently sending an extra zero byte after the password.

Change-Id: Id613e8ba2490c6a566c82bb8d1392b481fd98942
Reviewed-on: http://review.couchbase.org/28425
Reviewed-by: Aliaksey Kandratsenka <alkondratenko@gmail.com>
Reviewed-by: Michael Wiederhold <mike@couchbase.com>
Tested-by: Aaron Miller <apage43@ninjawhale.com>