client: add immediate finished data freeing feature

It uses max_pending_finished_sessions parameter. If the current number
of pending finished sessions is larger than
max_pending_finished_sessions, the current pending finished sessions
are freed immediately.