Changed Try::error and Result::error to return const references.

Review: https://reviews.apache.org/r/18489