Fix latex listings

Fix & refactor latex task listings.

Migrate Task database schema, convert sequence number columns data type to ``int ``.

Closes #289.