Added functions to affect/remove user to category, replacement of some deprecated code

Hello Patrick,
Along with previous - and closed - pull request (replacing some deprecated code), this request aims to add two new functions that can be useful to assign roles to users in category's context. In this way, users can access the course contents within the parent category without being enrolled in everyone of them, taking into account the role's permissions. 

Where I'm working it is useful for the internal figure of "Director of Curso' that needs to monitor the graduation courses he manages. Without this function, the entire enrolment process at category level has to be done manually. Others can have the same problem.

The functions are:
affect_user_to_category($client, $sesskey, $userid, $categoryid, $rolename)
remove_user_from_category($client, $sesskey, $userid, $categoryid, $rolename)

Greetings,

Micael Rodrigues