use availabilityId to determine bibid

Up until now we have been using ExternalDocumentID in Summon API search results to determine the bibid to use when linking to item views. But this has proven problematic since sometimes non-bibids ( ISBNs, etc) are included.

This pull request includes new logic for determining the id to use. It looks for an availabilityId in the Summon document. If that fails it will use the availaibilityId for the first document included in the peerDocuments stanza. An availabilityId has two parts, separated by a space, the second part of which is the id.

@cummingsm please test this thoroughly before merging. My existing unit tests in dbtest work fine, and I've tried to some searches based on the information in #897, but it would be good to have you double check any known problems.

fixes #897