Add API for multi-version queries

Added the ability to query previous revisions from views.
This completes issue #5.