Cancelable cleanup actions.

Use case:

func () (*C, error) {
  a, err := AllocResourceA()
  if err != nil {
    return nil, err
  }

  cleanup := NewCleanup(func () { FreeA(a) })
  defer cleanup.Run()

  b, err := AllocResourceB()
  if err != nil {
    return nil, err
  }

  cleanup.Cancel()

  return &C{a, b}, nil
}

Change-Id: Ib92b0e8bdcacc349e7cb949acd7eed054c783067
Reviewed-on: http://review.couchbase.org/42939
Tested-by: Aliaksey Artamonau <aliaksiej.artamonau@gmail.com>
Reviewed-by: John Liang <johliang00@gmail.com>
Reviewed-by: Aliaksey Kandratsenka <alkondratenko@gmail.com>