Support legacy builds
This MR introduces compatibility layer that transparently blends data from the new and the old nightly builds databases (with the possibility of using only the old one).
It is not an alternative to the migration of the data from the old instance to the new one, but it makes it possible to complete the redesign in flask while the new system is under development, with the added benefit of prototyping how the new reports should look like.
/cc @maszyman
Edited by Marco Clemencic