Author: Petr Skoda
MDL-30026 improve session lock acquire timeouts and other minor cleanup
This is partially based on original patch by Tony Levi.
http://git.moodle.org/gw?p=moodle.git;a=commit;h=a6ecee4ca09cd51215941115880aac3afb99ff32
http://github.com/moodle/moodle/commit/a6ecee4ca09cd51215941115880aac3afb99ff32
+ 2.1 en [sessionwaiterr,core_error]