Optimize memory and CPU usage.
Optimize memory and CPU usage.

The print_out_all_courses() routine consumes a ton of memory (2G and
causes noticable mongo usage spikes).  This actually causes other
processes on production boxes to be memory starved and killed
(such as worker children on edge when this was run recently).

The behavior of this script on production is
* Print several hundred courses
* Ask if you want to delete the one you specified
* print several hundred courses minus one
On a sandbox with 5 courses, you could tell by eye that 1 is gone, but
not in production (or even in stage).

The original PLAT-619 ticket for this suggested printing a course
listing on error, but instead it always printed the course listing.
Even in the error case, hundreds of course ids is confusing and obscures
the error message saying that your course_id is invalid.

You should be getting the course id from the UI or from ./manage.py lms
dump_course_ids, not by searching a list.

Adjusted the test accordingly

Remove get_courses_keys

bmedx/modulestore,bmedx/modulestore,bmedx/modulestore