Refactored list threads code to use ThreadEntity.
TODO: Make the add post method get an old thread object - fix list threads functional test.