Move automatic session data garbage collection to separate method
Sessions and session data are currently cleaned up automatically and randomly after 100 requests ("rand()%100"). When a frontend user session is bound to the session data table, this can lead to inconsistencies since one of these parts might be cleaned up without cleaning the other part. The result could be a still logged in frontend user without any session data containing basket items.
Move the garbage collection of session data to a separate method. Thus, in special cases it can be overriden by XCLASS and does not change the regular behaviour.
(issue imported from #M11509)