Address code review feedback

Summary:
* removed the useless include inside ddoc_cache
* revised the export listing style and removed confusing comments
* added guards back to older ddoc_cache:open/2 API
* clarified a type declaration, still strict until it's moved
* replaced match_newest sort with the canonical comparison rule
* simplified setting of the OpenerKey in some clauses
* renamed Rev* variables for correctness
* added back precious whitespace in some places