runtime: change has_msg_handler to virtual method of basic_block and add implementation to block_gateway to correct scheduler behavior with python msg handlers