api: make DB engine pool size configurable and increase default
Part of TFT-3527.
This should get rid of sqlalchemy.exc.TimeoutError: QueuePool limit of size 5 overflow 10 reached, connection timed out, timeout 30.00 (Background on this error at: https://sqlalche.me/e/14/3o7r) errors due to too many API calls.
Edited by Jan Havlín