fromhost: Remove acquisition of dev_base_lock

FromHost() was acquiring dev_base_lock, but this is not necessary
when calling alloc_netdev(), and indeed its an error as alloc_netdev()
can sleep when allocing memory.

The low level routines handle their own synchronization so acquiring
dev_base_lock is rarely necessary.

Verified by looking at the v2.6.0 kernel sources: the difference between
dev_alloc() and alloc_netdev() is the need for locking, so place
the lock inside the dev_alloc() pre-2.6 case.
click: Make preemption friendly

This change should effectively be a NOP for when CONFIG_PREEMPT is not
set, but is an attempt to make Click work better in the case of
CONFIG_PREEMPT being set.

In my testing, I was able to run with moderate activity for hours,
as well as unload and reload the system click configuration repeatedly.

This is good enough for running with CONFIG_LOCKDEP and CONFIG_PREEMPT
both enabled, which tends to make race conditions come out of hiding.

Specific changes:

    sync.hh: Move to using a mutex so that timer handlers
    and other things can sleep. This was a problem for
    elements which use mutexes for their synchronization.

    clickfs: Switch from semaphore to mutex

    Switch clickfs locking from using semaphores to mutex, as
    write handlers can now use mutexes for their synchronization.

    proclikefs: Switch some semaphores to be mutexes

    Some of the file system is protected by semaphores, so
    change only the appropriate ones.

    master: Make the master lock a mutex

    By making the master lock a mutex, sleeping functions can
    be safely called throughout click.

    Remove the use of preempt_disable(), added in
    e2e08269d8eb1bcef5b54b95738a39c5e73f0890.
    It appears that a0717e1fdad15ab3f29a76b204ecb710477c0372
    may have eliminated the underlying issue.
proclikefs: Allocate filesystem object statically

Allocate filesystem objects statically, since the embedded lock
key needs to be in static memory for lock dependency checking to
work.
Click: Kernel updates for 3.2-3.4 for proclikefs

Update proclikefs for compatibility with kernel versions > 3.0.
Integrate file system API changes for kernel 3.2, 3.3, and 3.4.
click: FromDevice - Add support for Linux 2.6.39

The interface for netdev rx_handlers changed in 2.6.39 to return
a status code instead of a skb pointer. Change the Click element
FromDevice to build with both interfaces.
Click fixincludes: fix mangling of radix-tree.h

Kernel changes in V3.1 include changes to radix-tree.h that
matched the regular expression used, but effected other parts of
the source file. Make the regular expression more specific so that
it will only change what was intended.
click: Make preemption friendly

This change should effectively be a NOP for when CONFIG_PREEMPT is not
set, but is an attempt to make Click work better in the case of
CONFIG_PREEMPT being set.

In my testing, I was able to run with moderate activity for hours,
as well as unload and reload the system click configuration repeatedly.

This is good enough for running with CONFIG_LOCKDEP and CONFIG_PREEMPT
both enabled, which tends to make race conditions come out of hiding.

Specific changes:

    sync.hh: Move to using a mutex so that timer handlers
    and other things can sleep. This was a problem for
    elements which use mutexes for their synchronization.

    clickfs: Switch from semaphore to mutex

    Switch clickfs locking from using semaphores to mutex, as
    write handlers can now use mutexes for their synchronization.

    proclikefs: Switch some semaphores to be mutexes

    Some of the file system is protected by semaphores, so
    change only the appropriate ones.

    master: Make the master lock a mutex

    By making the master lock a mutex, sleeping functions can
    be safely called throughout click.

    Remove the use of preempt_disable(), added in
    e2e08269d8eb1bcef5b54b95738a39c5e73f0890.
    It appears that a0717e1fdad15ab3f29a76b204ecb710477c0372
    may have eliminated the underlying issue.
proclikefs: Allocate filesystem object statically

Allocate filesystem objects statically, since the embedded lock
key needs to be in static memory for lock dependency checking to
work.
Merge branch 'master' of ssh://github.com/kph/click

Conflicts:
	linuxmodule/clickfs.cc
	linuxmodule/fixincludes.pl
	linuxmodule/proclikefs.c