Add management command to find domains impacted by 502 bug

http://manage.dimagi.com/default.asp?126120
Does this load every domain, app, module, and form into memory at once? Isn't that a lot of data?