BT: prevent conflicts when several processes call genbt5list in parallel

Cherry picked from commits:
  cacea29b568e1e7eba570de91ff113a123a6699c
  a455582922e6abd04c68aa7b56c9ea6a0980e27c
  073e3e4b8a348bc4ab8e4cf9395f2e021aecb17f
erp5_administration: fix script to delete obsolete BT now that revisions aren't integers anymore
erp5_administration: fix script to delete obsolete BT now that revisions aren't integers anymore