Add "errors" package

This is a thin wrapper over the `pkg/errors` package.  It decorates the
base package with the following functionality:

1. Wrap and Wrapf produce an error with exactly one stack trace.  If
the wrapped error already contains a stack trace, these functions just
append text to the message.

2. WithStack produces an error with exactly one stack trace.  If the
wrapped error already contains a stack trace, it is returned unmodified.

All of artifact's public APIs return errors produced with this package.
This allows us to remove the dependency on newt (`NewtError`) but still
retain error stack traces.
diff --git a/errors/errors.go b/errors/errors.go
new file mode 100644
index 0000000..8154fc5
--- /dev/null
+++ b/errors/errors.go
@@ -0,0 +1,63 @@
+// This is a thin wrapper over the `pkg/errors` package.  It decorates the
+// base package with the following functionality:
+//
+// 1. Wrap and Wrapf produce an error with exactly one stack trace.  If the
+// wrapped error already contains a stack trace, these functions just append
+// text to the message.
+//
+// 2. WithStack produces an error with exactly one stack trace.  If the
+// wrapped error already contains a stack trace, this function returns it
+// unmodified.
+
+package errors
+
+import (
+	"fmt"
+
+	pkgerrors "github.com/pkg/errors"
+)
+
+type stackTracer interface {
+	StackTrace() pkgerrors.StackTrace
+}
+
+// Cause retrieves the underlying cause of an error
+func Cause(err error) error {
+	return pkgerrors.Cause(err)
+}
+
+// Errorf formats an error
+func Errorf(format string, args ...interface{}) error {
+	return pkgerrors.Errorf(format, args...)
+}
+
+// New creates a new error
+func New(message string) error {
+	return pkgerrors.New(message)
+}
+
+func Wrap(err error, message string) error {
+	if _, ok := err.(stackTracer); !ok {
+		return pkgerrors.Wrap(err, message)
+	} else {
+		msg := err.Error() + ": " + message
+		return pkgerrors.WithMessage(err, msg)
+	}
+}
+
+func Wrapf(err error, format string, args ...interface{}) error {
+	return Wrap(err, fmt.Sprintf(format, args...))
+}
+
+func WithStack(err error) error {
+	if _, ok := err.(stackTracer); !ok {
+		return pkgerrors.WithStack(err)
+	} else {
+		return err
+	}
+}
+
+func HasStackTrace(err error) bool {
+	_, ok := err.(stackTracer)
+	return ok
+}