Bug fix, added session garbage collection

1.) Fixed a bug in the AIML search/edit page that caused AIML categories
to be deleted without confirmation
2.) Added a function to perform garbage collection on expired sessions.