Remove unused import
Add profile ID to encoded filename

When more than one profile is configured to have the same encoding
container, this keeps the output files from overwriting one other.
Remove uploaded state field

With recent changes, this field now exactly mirrors the state of
the encoded field, so it doesn't provide any additional
information.
Simplify media state transitions