Move module level funcs to unit tests that uses em

The chunks() and timeout() module level functions are only used by one
test each, so we just move them to those tests to indicate they are not
used globally.

Change-Id: I947dfceff01499ca09f3887157dc3bbcbcc0f20b