refactoring seriesly api

Change-Id: Ie906e0ba215c8d7eb646eb4763650eb2cb4f27c7
Reviewed-on: http://review.couchbase.org/23818
Tested-by: buildbot <build@couchbase.com>
Reviewed-by: Pavel Paulau <pavel.paulau@gmail.com>