Remove PTHDEBUG2; rename PTHDEBUG to CONFIG_DEBUG_TASK.
Remove redundant setting of task duration.
Move native-mode task definitions to a separate file.

task.h was getting too complicated to understand, so copy it
and strip out all the non-native stuff.  This will make changes
to it easier.

Likewise, remove all the native stuff from the original file.
Move some declarations out of native .c files into task.h.

There is some commonality between pth and pthreads implementations
that can be shared.
Move pth link flags into HOST_LFLAGS.

Don't automatically try to pull in pth.  Use the configuration
option for CONFIG_PTH to add these.
Fix type error in console UI.
Move functions common between pth/pthreads into new file.

ntask.c is the home for common, native task support.
pth.c and pthread.c will host any differences depending on
the thread library to be used.

More separation is possible, but this is the first step.
task_find_gid, task_find_gid_next are now common to pth/pthreads.
Move task table initialization to common code.
Add common routine to lookup task data by PID.

Rewrite many functions in terms of this aux_task_find_pid(),
which reduces total complexity of the pth/pthread files.
Ensure low-level task library is initialized before ntask_init().

This is because it will call task_getpid() to set the first PID
in the table.  getpid() may return undefined results if it is
called prior to low-level init.
Enhance pth level debugging.
Refactor common task create/delete logic.

Add aux_task_create(), aux_task_delete() functions for this.
With this, the pth/pthreads implementation files are about
as simple as they can be.
Fix prototype for ui_write_task() to use task_gid_t, not int.
Major cleanup of the native mode task support.

The major change is to refactor the things in common
between the different task implementations (pth, pthread)
into a new, "native task" module (ntask.c), so that the
existing files only have the thread-specific functions.

This also will enable new task libraries to be added much
more easily, as fewer functions need to be written.
Minimal platform builds for ARM by default.

The GCC_CROSS setting in the platform file enables this.
queue.h : Add missing include guard
Fix extern declaration, slightly different from what it should be.
Fix warning in unused locale read on min platform
Fix slightly incorrect extern type