uspace: Factor RtapiApp class definition to header

.. this enables an RtapiApp implementation besides Posix to be
implemented in a separate translation unit.
uspace: Move rtapi_task / task_array to header

.. so that other RtapiApp implementations can use the fields in this
structure
uspace: Factor out "task_get" into a method
uspace: use RtapiApp::get_task()
uspace: Eliminate race condition when allocating a task

Now a task structure has three states:
 magic = 0 -> not allocated
 magic = TASK_MAGIC_INIT -> allocated but not fully initialized
 magic = TASK_MAGIC -> allocated and fully initialized
even though there's only ever one thread calling task_new, the transition
from magic 0 to TASK_MAGIC_INT is now performed by the atomic primitive,
__sync_bool_compare_and_swap, solving the hypothetical thread safety
issue noted in the old FIXME comment.
uspace: Private storage for other RtapiApp implementations

Other uspace RtapiApp implementations might require their own private
storage associted with each task.  They may store this in the 'appspecific'
field, assuming that they never use the 'thr' field.
docs: Note GPL license on files
rtapi: Note GPL license on files
hal: Note GPL license on files