simplify sorting of monitors, and fix the stack trace output so we don't skip frames

git-svn-id: http://h2database.googlecode.com/svn/trunk@5679 e6896862-9d19-0410-bfb3-e9fa5d50e656