Use lexical-binding in autoinsert.el and add tests

* lisp/autoinsert.el: Use lexical-binding.
Remove redundant :group args.
(auto-insert): Simplify.

* test/lisp/autoinsert-tests.el: New file with tests for
autoinsert.el.
1 job for master in 4 seconds (queued for 4 seconds)
Status Job ID Name Coverage
  Test
failed #1956
test-all

00:00:04

 
Name Stage Failure
failed
test-all Test There has been a runner system failure, please try again
Running with gitlab-runner 11.6.0 (f100a208)
on gitlab-runner-docker cff9d373
Using Docker executor with image debian:stretch ...
Pulling docker image debian:stretch ...
Using docker image sha256:8d31923452f8b79ae91b01568d28c90e7d667a9eaff9734c6faeb017b0efa8d0 for debian:stretch ...
ERROR: Job failed (system failure): Error response from daemon: failed to start shim: exec: "docker-containerd-shim": executable file not found in $PATH: unknown (executor_docker.go:1018:0s)