Added the API layer.

This is still bare bones. It lacks from unit tests, documentation and a much
needed polishing.
app: updated the tests from my previous commit.
app: added tests for the new API layer.
topics: splitted the regular HTML and the JSON responses.
topics: cleaned up the API layer and extended its test suite.
app: added documentation.
app: removed the Rendered attribute from the TopicData type.
app: more on documenting.
lib: added tests for the api.go file.
lib: removed the GetUserId function.

It was only used in the routing.go file.
lib: added documentation for the api.go file.
lib: fixed some issues in the tests.
Documenting the routing.go file.