[api] convert old request history DB to new structure
[api] ensure ordering by priority in request search
[webui] use new generic history for requests