Add ZeroTest self-testing routine

Allows user to run basic tests upon initialization. It's available when -zerotest option is used, results are written into debug.log file.