Close the db cursor created for updating the local_id.
Close the db cursor created for updating the local_id.

We compute a review request's local_id by running some custom SQL. In doing so,
we create a db cursor, which we weren't closing correctly. Eventually the
garbage collector would get around to it, but we really should be closing it
ourselves.

In Django 1.7, we can avoid this and make it slightly more safe by using the
cursor as a context manager. I've added a TODO comment to track that.

Testing done:
Ran unit tests.

Reviewed at https://reviews.reviewboard.org/r/8713/

sgallagher/reviewboard,chipx86/reviewboard,davidt/reviewboard,brennie/reviewboard,reviewboard/reviewboard,davidt/reviewboard,reviewboard/reviewboard,brennie/reviewboard,sgallagher/reviewboard,davidt/reviewboard,reviewboard/reviewboard,brennie/reviewboard,brennie/reviewboard,chipx86/reviewboard,davidt/reviewboard,chipx86/reviewboard,chipx86/reviewboard,reviewboard/reviewboard,sgallagher/reviewboard,sgallagher/reviewboard