The point of this sub tasks is to fix the old upgrade code for the core issues in MDL-25677.
See MDL-25677 for a full list of issues to be fixed.
Add upgrade code to fix discrepancies
upgrade issue: tag_instance.tiuserid should have default value
Created PULL-69 with a patch for this issue, you can check it out at: https://github.com/samhemelryk/moodle/compare/master...MDL-25789
as commented in PULL-69, I'm reopening this because I think it needs some more work (missing bits).
Thanks for the feedback Eloy, changes have now been made (see meta issue MDL-25677).