legacy: fix for run_sql import in bibrecord

* Addresses issue with imports outside application context.
  (closes #2295)

* Amends imports from `invenio.legacy.bibrecord.scripts`.

Signed-off-by: Jiri Kuncar <jiri.kuncar@cern.ch>