build: generate sh.config for feeding configure results to shell scripts

Only include the relevant information.

Amended by David Bremner:

	Use a prefix NOTMUCH_ to minimize collisions with other
	variables.
test: use sh.config for configuration