don't flush individual user objects

SQLAlchemy has deprecated this behaviour a long time ago, although we
still have a few calls like this in Beaker. This one is particularly
problematic because it will show up in the cron output of
beaker-refresh-ldap, if a new user is added:

    /usr/lib64/python2.6/site-packages/sqlalchemy/orm/scoping.py:139: SADeprecationWarning: The 'objects' argument to session.flush() is deprecated; Please do not add objects to the session which should not yet be persisted.
      return getattr(self.registry(), name)(*args, **kwargs)

Change-Id: I7feb2f239506b5bba2b1e22c02f7888391423599
return 409 when attempting to record a result against a finished task

Recording a result for a finished task is against the spirit (and now
the letter) of the API and probably indicates a programming mistake on
the harness side. But we can still return a nice response instead of
500.

Bug: 962254
Change-Id: Iee7adaaa3acc4df91e16866b0aa24ccb3016f74e
fix up a few SQLAlchemy warnings

Change-Id: I41f47f4bfe80e9ae10e5950c65a9e6b64753a4e2
Merge changes I41f47f4b,Iee7adaaa,I7feb2f23 into develop

* changes:
  fix up a few SQLAlchemy warnings
  return 409 when attempting to record a result against a finished task
  don't flush individual user objects