commands can now send multiple lines properly:

the functions can now be generators, use the `yield` statement to send a line, the code will be resumed after. to stop the command before the end of the function, just use core.stop() (this will raise StopIteration)