Add possibility to load events with a function

Replace the "events_url" option with a "events_source".
- If it's a string: no changes (everything remains like it's now).
- If it's a function: this function gets called and it should return the event list
Generalize log management and accept deprecated events_url option
Merge pull request #111 from Serhioromano/function-to-load-events

Add possibility to load events with a function