[core] Complete transition of XMLTV to database