ref #1894 [code refactoring, introduced session, media streams]

- some methods are marked deprecated
- changed library API interface
- introduced session class
- introduced media stream class