Support local bibliographies.

This implements filtering on docnames, which allows local bibliographies to be used far more conveniently.