Add shellcheck to gitlab ci and git hook
This is a resubmission of !270 (merged) (apropos #304 (closed)), a contribution by @schischkin.
I'm making a new MR of it because something seems to have happened to https://gitlab.torproject.org/schischkin/arti which prevented me from adding a tiny fixup to the branch. Otherwise I would have merged it.
Edited by Ian Jackson