When displaying the topic subscription buttons, for each button, we need to check if the user is already subscribed, to display the button in the correct state.
Currently we do that inefficiently, with one database query per button. We can do it all in a single bigger query instead.