Add support for restful flush

Change-Id: I48ef2e18cd863a8ea306cb7510b547a9c882e23d
Reviewed-on: http://review.couchbase.org/29152
Reviewed-by: Sergey Avseyev <sergey.avseyev@gmail.com>
Tested-by: Trond Norbye <trond.norbye@gmail.com>