PCBC-106 Adding Touch (& Get-with-Touch) Support

This changeset addresses PCBC-106 by adding touch/mulit-touch
functionality as well as touch options to the existing get
functions.

Change-Id: I8a2eb0bc945dc9674457f63768b2cb7ed2de3c30
Reviewed-on: http://review.couchbase.org/21055
Reviewed-by: Mordechai Nunberg <mnunberg@haskalah.org>
Tested-by: Mordechai Nunberg <mnunberg@haskalah.org>
Reviewed-by: Matt Ingenthron <matt@couchbase.com>
PCBC-103: Support for Get-with-Lock

This changeset adds support for setting a lock when using get
functions.

Change-Id: I0f63530d257436cdd5a9eb910e54e1e4d389c144
Reviewed-on: http://review.couchbase.org/21062
Tested-by: Mordechai Nunberg <mnunberg@haskalah.org>
Reviewed-by: Mordechai Nunberg <mnunberg@haskalah.org>
Reviewed-by: Matt Ingenthron <matt@couchbase.com>
PCBC-117 Checking that expiry times are non-negative

This adds checks to the following operations to ensure that the expiry
times specified by the user are non-negative:
* add
* set
* set-multi
* replace
* append
* prepend
* cas
* increment
* decrement
* get
* get-multi
* get-delayed
* touch
* touch-multi

If the check is not successful (i.e. if the user has supplied a
negative value), a fatal error is thrown by the extension.

This is the master-branch version of an equivalent bugfix commit on
1.0.x.  During development of this patch fix, two small bugs (arginfo
handling of flags param for multi-get, initial return_value set within
touch commands) were encountered and fixed as well.

Change-Id: I08eab920c5ca51901b4973ce6669b07b7e3acee7
Reviewed-on: http://review.couchbase.org/21090
Reviewed-by: Mordechai Nunberg <mnunberg@haskalah.org>
Reviewed-by: Matt Ingenthron <matt@couchbase.com>
Tested-by: Michael Jackson <mjackson@omniti.com>
Provide more helpful error when encountering older library

(mjackson: fixing sense of a test to check for non-zero [-n] instead of
zero [-z] length string of the version missmatch error variable)

Change-Id: I135dd77bc6f13ba576ab199bec2203b04a807d34
Reviewed-on: http://review.couchbase.org/21177
Reviewed-by: Michael Jackson <mjackson@omniti.com>
Tested-by: Michael Jackson <mjackson@omniti.com>
Reviewed-by: Mordechai Nunberg <mnunberg@haskalah.org>
Tested-by: Mordechai Nunberg <mnunberg@haskalah.org>
Restructure tests

Add new tests which are based on an xunit-type framework (compatible
with but not dependent on PHPUnit).

At this stage there are still some redundant legacy tests, and these
will be removed in a subsequent commit).

Change-Id: I83d6396105f362f7129c765e16e7938d8de4543d
Reviewed-on: http://review.couchbase.org/21119
Reviewed-by: Michael Jackson <mjackson@omniti.com>
Tested-by: Michael Jackson <mjackson@omniti.com>
Reviewed-by: Matt Ingenthron <matt@couchbase.com>
Remove deprecated testfiles (list follows)

=== List of replacements ===

OLD  NEW
---  ---
001: **no replacement yet (load test)
002: Connection
003: MutateBasic
004: MutateBasic
005: **TBD
006: **No flush tests yet
007: GetMulti
008: Delete
009: **TBD (need to modify touch)
010: Arithmetic
011: MutateBasic
012: ServerStats
013: Replace
014: AppendPrepend
015: IntegerArgs
016: Errors
017: GetMulti
018: EmptyKey
019: Delay
020: Delay
021: Delay
022: Arithmetic
023: Serialization
024: Serialization
025: Serialization
026: Prefix
027: Compression (broken in the ext)
028: Connection
029: IntegerArgs
030: ViewSimple
031: ViewSimple
032: GetMulti
033: Errors
034: ViewSimple
036: Connection

037..050: **TBD (Negative expiry)

Change-Id: I44f1488138f2166ecf58fea171ece3be9b79441d
Reviewed-on: http://review.couchbase.org/21212
Reviewed-by: Michael Jackson <mjackson@omniti.com>
Tested-by: Michael Jackson <mjackson@omniti.com>
Tested-by: Mordechai Nunberg <mnunberg@haskalah.org>
Reviewed-by: Mordechai Nunberg <mnunberg@haskalah.org>
Refactor negative expiry tests

Change-Id: I4ed82839f1a419f5cc3bdf388f8405bba44f5db2
Reviewed-on: http://review.couchbase.org/21228
Reviewed-by: Michael Jackson <mjackson@omniti.com>
Reviewed-by: Mordechai Nunberg <mnunberg@haskalah.org>
Tested-by: Mordechai Nunberg <mnunberg@haskalah.org>
Support skip sections

This allows tests to be skipped and generate the --SKIPIF-- section in
phpt

(mjackson: making negative expiry error E_RECOVERABLE_ERROR; this is
a fatal like E_ERROR but can be caught by a user-defined error handler
function, which makes testing these conditions much easier.)

Change-Id: I4e1510845c17d19b75900198e449ffd602cd7eb7
Reviewed-on: http://review.couchbase.org/21236
Reviewed-by: Michael Jackson <mjackson@omniti.com>
Tested-by: Michael Jackson <mjackson@omniti.com>
Tested-by: Mordechai Nunberg <mnunberg@haskalah.org>
Merge branch 'master' of git://github.com/couchbase/php-ext-couchbase

Conflicts:
	tests/002.phpt