Some fixes in bitmask implementation

Also added find first set function
Changed gdb.sh to run cgdb
Improved search of next ready no value instance

Hopefully it does not break the protocol :)