inlined unnecessary helper method

Signed-off-by: Yulia Tolskaya <ytolskaya@pivotallabs.com>
stricter assertion on #get_state
Prune job release from legacy agent states

This will avoid an unnecessary update after upgrading the director.
formatting

Signed-off-by: Jesse Zhang <jz@pivotallabs.com>