Merge API with core

Hi, I've pulled the latest code from master branch and updated the API branch with latest code.
I've used filter `rtmedia_current_user` in core file for the function get_current_user_id() at some places.