Backport PR #4030: exclude `.git` in MANIFEST.in

so it won't be included in submodules in sdists.
Backport PR #4101: restore accidentally removed EngineError

in cleanup PR #3527, I removed one too many exception classes.

I acked IPython to check that I didn't miss any more.

closes #4100

should be backported to 1.1.