Improvements and fixes to cancel build and job

This version is really simple, ie. it allows to cancel only jobs, which are not queued yet.