Fix #387 - Creating competition is not transactional

Fixing https://github.com/codalab/codalab/issues/387 by making database operations transactional while unpacking a competition.