Locking and dispatching performance improvements:

* Avoid taking the master lock in most peer operations
* Dispatch recvGetLedger to JobQueue
* Dispatch consensus ledger fetches.
* Release master lock earlier in RPCHandler
Ledger fetch improvements. Fetch policy improvements.
Refactor, tidy up:
* Fix for msvc std::function return types
* Convert macros to constants
* Add Journal to PeerSet and use in InboundLedger
* Break lines and add annotations
* Remove some warnings
OrderBookDB::addOrderBook cleanup
Make offerDelete and fill Items more robust.
Add ScopedPointer::reset
Improved human readable JSON-RPC error messages
Error reporting tests
Use duration in insight::Event, add chrono_util
Move PathRequests to separate files
Insight support for ResourceManager
Handle non-object in 'json' RPC method
Clean up the checkAccept path to use the ledger sequence
Replace a lock with an atomic in new pathfinding
Clean up 'destination_currencies' in new pathfinding reply
Remove extraneous logging
Revert d2953f602eeee759e3e1c5a4d3a00ba51c5349a0
Support AccountTxnID and LastLedgerSequence.
Add directory and order book iterators
This should fix the crossed order book bug.
* Change OfferCreate::takeOffers to use new iterators
* Change NetworkOps::getBookPage to use new iterators
* If we find an offer in the book but not the ledger, deindex it
Add DeliveredAmount to transaction metadata