MessageTable plugin

Refactor all message table related code and make it as a jQuery plugin

Change-Id: Icf0b31207df5c18e1e53bcf9b399641988a9f2e7