Rationalize emacs testing

Major overhaul of emacs testing.

1. Integration tests much more robust, easier to add new tests.
2. Removal of a lot of redundant code.
3. Fixed all byte-compilation warnings and added check to travis (closes #453).
4. Added integration test for FSI.