Tries to fix duplicate index errors.
Implements rewrite/query helpers; improves version management.

* Rewrite rules are rebuilt along w/ DB.
* A version that is not numeric (eg. ends w/a letter) will cause
rewrite rules/DB to be rebuilt all the time.
* Adds helpers for build routes at the plugin base, thru the
rewrite_rules and rewrite_vars property arrays.