Removed one instance of the duplicated function date_range. macro.py now imports this function from ticketstats.py. get_num_closed_tix and get_num_open_tix are now non-member functions. Eventually, they will be shared between the macro.py and ticketstats.py modules.

List output for all three macros is limited to a maximum of 5 items, if not
explicitely specified by top=<n>, where in turn 'n=0' means unlimited.
The previous limit of 10 items (TopVoted only) looked like too much.

And rendering of resource links respects the compact argument too, what
yields significantly reduced output for milestones and tickets.

conversion of internal resource pointers from path to resource identifiers

schema version entry in Trac db table system

two time stamp columns for both, initial vote and last change/update

Introduce slightly reduced version of common schema upgrade code and unit
tests covering possible install/upgrade scenarios.
Time stamp columns are prerequisite for something like vote history.
This might be available later on as core feature or using a wiki macro.