MDL-43736 Events: event->contextinstanceid should be used where possible

While restoring event context might not be present (deleted)
So before using context api's check context or use event properties
MDL-43661 use new edulevel in all existing events
MDL-37658 add new logging API with basic implemenation
MDL-37658 logging: fixed bug in legacy logging
MDL-41266 move reader access control out from manager

We need to let reports decide if they want to use capability to access readers.
MDL-41266 logging: Legacy reader should convert passed courseid to course in sql queries
MDL-37658 logging: convert all standard log fields to legacy log fields
MDL-43682 logging: Add a trait to group together common methods for reports
MDL-43682 libraries: Add a method to return html for row instead of just printing it
MDL-43682 reports: Add ajax support for live logs
MDL-43682 reports: Update version requirments
MDL-34055 add bulk DB->insert_records() method
MDL-43759 logging: Add helper traits for stores and add support for buffering
MDL-43759 logging: Update stores to remove duplicated code