REPL cleanup.

Author: Michael Armbrust <michael@databricks.com>

Closes #451 from marmbrus/replCleanup and squashes the following commits:

088526a [Michael Armbrust] REPL cleanup.
(cherry picked from commit 3a390bfd80f80739b9d847780eccc443fc2dc0ea)

Signed-off-by: Patrick Wendell <pwendell@gmail.com>