Use stable sort when cleaning batches.

Ensure valid batches do not change order. This was causing rendering
issues when m_rebuild was 0, as we would not re-sort the list in correct
render order after cleanup.

Change-Id: I912fb313d4029f96e263fad24d68462f252003df
Reviewed-by: Gunnar Sletta <gunnar.sletta@jollamobile.com>