clean up and optimize get_output_module
clean up and optimize get_output_module

- reorganize the function to return if we have a module, to remove
nesting.
- walk the linked list of output modules with next pointers instead of
  indexing into the list.

Reviewed-by: Christopher Brannon <12dbcddb2a34235e759e3c56208f0d4ec028c34a@gmail.com>

razr/speechd,razr/speechd,razr/speechd,razr/speechd