Move upload lookup to DAO

    Using criteria in the util makes it far more complicated to test
    with no benefit.
Avoid storing last upload part in database.

    This fixes an issue where the last part was not returning any
    bytes, and reduces unnecessary database activity.