Separate gem management code from application controller code

Creates an SQGemManager class to handle gem installation and
executable launching.