common: Implement generic retry helper

Implemented a generic retry helper than can be used to call a
function repeatedly with backoff interval until the function
returns non-error value.

Example:

    fn := func(r int, lastErr error) error {
        if r > 0 {
            fmt.Printf("Error occured (%v) .. Retrying(%d)\n", lastErr, r)
        }
        if r == 8 {
            return nil
        }
        return errors.New("failed")
    }

    rh := common.NewRetryHelper(10, time.Second*2, 2, fn)
    err := rh.Run()

Change-Id: I7e9e9b03007207a62a9f4fdcd792de41f5034083
Reviewed-on: http://review.couchbase.org/43710
Reviewed-by: Pratap Chakravarthy <prataprc@couchbase.com>
Reviewed-by: Sarath Lakshman <sarath@couchbase.com>
Tested-by: Sarath Lakshman <sarath@couchbase.com>