Moved message action logic to BbToHtml

Added new "type" column in MessagesTable
All actions are processed while writing the row in the local db
Database version increased to 2