Topic controller.
Move a query to subs. Clean up topic attributes functions.

Signed-off-by: Norv <a.w.norv@gmail.com>
MoveTopic controller.
Move two queries to subs.

Signed-off-by: Norv <a.w.norv@gmail.com>
MoveTopic controller. The last query gone. Clean-up useless $db.

Signed-off-by: Norv <a.w.norv@gmail.com>