realtime.in:  complete status checks & debug msgs; reusable functions

- separate out some basic reusable functions
- debug messages when DEBUG>1
- better checking of shmdrv
- more complete status checking
.gitignore hm2-idrom/realtime.log.* output