Tear A* out into its own function in corobot_common.