use table lock while adding new external rpms
PR #794 introduced savepoint-based solution for parallel addition of
external rpms. In some usecases there could be a lot of external rpms
being added, so potential for deadlock is much higher than before.
Locking the table seems to be a bit expensive but SHARE ROW EXCLUSIVE
should be a working compromise (anyone not writing to the table has
still read access).
Related: https://pagure.io/koji/issue/3637