fix hz mesaure test

- use 300 for default message_num, rostopic hz uses 50000?
  https://github.com/ros/ros_comm/blob/indigo-devel/tools/rostopic/src/rostopic/__init__.py#L111
-  use median instead of average