[videodb] table formatting cleanup (the second)

These are the commits from #5198 but rebased and with my comments from the review addressed.

Personally I think cleaning up CVideoDatabase is an important step into getting a better database implementation because it will make it easier to migrate if all tables, views, indices and triggers use standardized names and schemas.