Cache calculated transaction IDs

After reviewing some profile data from tests, optimizing `SerializedTransaction::getTransactionID` seemed like a low-risk, moderate-reward modification. Cache the calculated transaction ID (cached results are being returned 63.57% of the time according to my test), and use references to further reduce overhead by avoiding expensive copying of `uint256` objects.

Reviews: @JoelKatz, @ximinez. 

Of particular interest is this change to use a reference instead of a copy of a `uint256` in `Key`: https://github.com/nbougalis/rippled/compare/perf?expand=1#diff-9a6914338001348adab12c49e3ab9bb9L67
That's what I figured. Thanks.

On Tue, Oct 7, 2014 at 12:30 PM, Nik Bougalis <notifications@github.com>
wrote:

> In src/ripple/app/paths/cursor/AdvanceNode.cpp:
>
> > @@ -234,7 +234,7 @@ TER PathCursor::advanceNode (bool const bReverse) const
> >                              << "advanceNode: PAST INTERNAL ERROR"
> >                              << " REVERSE: OFFER NON-POSITIVE:"
> >                              << " node.saTakerPays=" << node().saTakerPays
> > -                            << " node.saTakerGets=%s" << node().saTakerGets;
> > +                            << " node.saTakerGets=" << node().saTakerGets;
>
> It was converted from a boost::format at the %s was missed.
>
> —
> Reply to this email directly or view it on GitHub
> <https://github.com/ripple/rippled/pull/610/files#r18531313>.
>



-- 
*Edward Hennis | *Senior Software Engineer | *Ripple Labs Inc.*
ed@ripple.com | www.ripple.com | *www.ripplelabs.com
<http://www.ripplelabs.com/>*
T. 352.327.8769