More cleanup, moved common code/imports to splunklib/modularinput/modularinput_testlib.py

Also removed the malformed data exception since it's not needed.