Redcore 241 update libraries

I have updated many things, not just external libraries, even some classes that were derived from Joomla and updated later.

I have also applied pagination fix in here while working on this task.
Little bitching from my side :P 
Travis might report an error here since function return should not have any empty lines after.