Maximum recoverable work for incompressible viscoelastic fluids and application to a discrete spectrum model