[FIX] REST: handle concurrent transactions. Closes #666
Merge branch 'next' of github.com:BaseXdb/basex into next