python: make sure spot.automata() terminates the command

Fixes #341.

* python/spot/__init__.py (automata): Rewrite and simplify using
the subprocess context manager.
* tests/python/341.py: New file.
* tests/Makefile.am: Add it.
* NEWS: Mention the issue.
10 jobs for next in 111 minutes and 15 seconds (queued for 1 second)
Status Job ID Name Coverage
  Build
passed #4199
arch-clang

00:38:19

passed #4200
arch-gcc-glibcxxdebug

00:39:08

passed #4198
debian-gcc-snapshot

01:00:45

passed #4196
debian-stable-gcc

00:37:27

passed #4197
debian-unstable-gcc-coverage

00:31:01

88.9%
passed #4203
debpkg-stable

01:49:36

passed #4204
debpkg-unstable

01:49:24

passed #4201
mingw-shared

00:09:29

passed #4202
mingw-static

00:09:14

 
  Publish
passed #4205
dput
publish-unstable

00:01:37