Add optional timeout parameter to gyield

It would be more pythonic for timeout to be None.