steam-api: fixed several issues with steam_api_summaries()

This is a refactor of steam_api_summaries() which addresses several
issues, some of which led to segfaults.