use wkhtmltopdf --cookie parameter to use users moodle session to authenticate for loading pluginfiles instead of replace pluginfile references with datauri on html tmp store.
inserted session_write_close() call before exec wkhtmltopdf with cookie parameter to prevent hanging up due to sessiondata lock. see http://php.net/manual/en/function.session-write-close.php
Merge branch 'dev-session' into develop