moodle/tool_mergeusers: added special case for course_completions database table and simplified process of tables with compound indexes using a user field.
moodle-mergeusers - bug solved: renamed table on special case.
moodle-tool_mergeusers: refactoring of plugin enabling CLI scripts, more Moodle-friendly (both web and code), added special cases on message-related database tables.
Merge pull request #13 from jpahullo/course_completions

Course completions
Merge branch 'master' of github.com:ndunand/moodle-mergeusers into refactoring
moodle-tool_mergeusers: adding CLI scripts and recording merging logs into database for further reference.
moodle-tool_mergeusers: fogotten to remove a debug trial.
moodle-tool_mergeusers: added logs visualization.
    * Settings present two links on merging users, one for merging and another one for viewing logs.
    * Viewing logs lists a table with ALL the records, with helping links:
        * One link to see the full log of actions.
        * One link on every user field to bring the admin to the given user.
    * The plugin also detects whether the user is no longer present on database, showing that user with ID X was deleted.
Merge pull request #14 from jpahullo/refactoring

Refactoring
Merge branch 'cliandlogindb' of https://github.com/jpahullo/moodle-mergeusers into jpahullo-cliandlogindb
Merge branch 'master' of github.com:ndunand/moodle-mergeusers