BLIP: fix for memory not freed on send queue fail

If an outgoing packet fragment is unable to be added to the send queue,
the fragment message_t and send_info were never put back in their pools.
This patch cleans up that memory.
Merge pull request #288 from lab11/blip-free-on-failed-queue

BLIP: fix for memory not freed on send queue fail
Removed improper files from the repository.

- Removed all old .cvsignore files.
- Removed tunit.extra. (references toscontrib)
  This extra relies on having toscontrib, so it should be in toscontrib.
  By setting the TINYOS_ROOT_DIR_ADDITIONAL variable this should be easy.
- Removing eval-crash.diff
  This seems to be an errantly commited file.
Updated .gitignore

Added all of the various make output
Removed assumed environment variables

Many places in /tools (and in READMEs) code or documentation assumes
that there are environment variables set. In order to remove the
requirement that environment variables need be set, this commit changes
structure to work without the environment variables. Generally, this
means adding an argument so that callers of scripts can pass in the
information the environment variable used to provide.

A major consequence of this is that ncc --print-tosdir no longer works.
Any instance of this is now removed.
Set TINYOS_ROOT_DIR in Makefile, change var names

This removes the non-desireable requirement that a user must set
environment variables in order to build TinyOS. The $TOSROOT variable
then trickles through the makefiles and in makerules $TOSDIR is set.

The overhead to do this is small (1 line in each application makefile)
but it should really help make tinyos more user friendly.

TOSROOT is set with "?=" meaning that it won't override TOSROOT if it is
already set by an environment variable.

Makefile.include in the root sets TOSDIR and MAKERULES before including
$(MAKERULES). This allows the current env variables to override the
derived settings.

Changing TinyOS Make system variable names:

| Old Variable        | Proposed Variable Name      | Default Value                    | Purpose                                                             |
|---------------------|-----------------------------|----------------------------------|---------------------------------------------------------------------|
| TOSROOT             | TINYOS_ROOT_DIR             | relative to application Makefile | Base for all other variable defaults                                |
| TOSDIR              | TINYOS_OS_DIR               | $TINYOS_ROOT_DIR/tos             | Path to `/tos` folder containing main system source to compile with |
| TINYOS_MAKE_PATH    | TINYOS_MAKE_DIR             | $TINYOS_ROOT_DIR/support/make    | Path to `/make` that contains the targets, extras, and rules        |
| MAKERULES           | TINYOS_MAKERULES            | $TINYOS_MAKE_DIR/Makerules       | Path to main makefile                                               |
| TINYOS_MAKELOCAL    | TINYOS_MAKELOCAL            | $TINYOS_MAKE_DIR/Makelocal       | Path to optional Makelocal file                                     |
| TINYOS_MAKEDEFAULTS | TINYOS_MAKEDEFAULTS         | $TINYOS_MAKE_DIR/Makedefaults    | Path to Makedefaults                                                |
| TOSMAKE_PATH        | TINYOS_MAKE_DIR_ADDITIONAL  | unset                            | Space separated paths of additional `support/make` directories      |
Moved support code to tools/, now gets installed

In order to remove more environment variable usage, the tinyos python
code must be installed on the user's system instead of in the tinyos
tree. This commit moves all the python to tools so automake will install
it. Doing this requires one subtle change: "import tos" will no longer
work. It needs to be "from tinyos import tos" now.

I think I updated all of the relevant files.

One note: python3 is handled a bit weirdly, and therefore tos-serlook.py
may not be able to find tinyos.misc.hexdump. It seems that
/usr/local/lib/python3/dist-packages is not in the search path by
default. I fixed this by adding "tinyos.pth" containing the correct
directory to /usr/local/lib/python3.2/dist-packages.

The CoAP support code will now be built and installed with tinyos-tools.

I updated coap.extra to reflect the moved .c files.

Moved blip support to /tools directory

Will not compile the blip sdk code on cygwin as it only supports linux and mac.

Moved sf and serial_tun to /tools

I have no idea if anyone still uses this code. The configure script for
sf is out of date and does not work with newer automake (I updated it).

I also renamed some binaries so they can be installed. If the user is
installing TinyOS, they may as well _install_ tinyos. Why make them hunt
around for different binaries? If something shouldn't be installed, then
the question is why is it distributed with the main TinyOS source? It
should be some sort of optional extra somewhere, not part of the main
source. Hard drives are big, just give me all of the TinyOS tools.

Because there are 2 sf applications, the cpp version is named sf2.

Moved java to /tools; Removed env vars

Java is now compiled and installed with tinyos-tools

Moved imote2-ocd-program.py to /tools

No reason to have the makefile need to dig into tools in order to
install to the hardware.
Changed tinyos-tools version to 1.6.0
Removing ncc, nesdoc, mig, ncg

ncc is a very strange step in the build process. It is basically a
magical perl script that sets a bunch of include directories, but is
really just another opaque layer to figuring out how tinyos is getting
built. While trying to re-write it to make it a bit cleaner and smarter,
I had a realization: Why are include directories and nesc flags (which
are used to compile code) smack dab in the middle of a src folder
(tos/platforms/<platform>/platform)? Why isn't all of that contained in
the make system (where you would expect it to be? In fact, why do we
need these magic files (platform, family, sensor) at all?

This commit addresses these questions by starting to move what was in
the platform (etc.) files into the make system. In this way, X.target
files include Y.platform files, Z.sensor files, (etc.) in order to get
all of the relevant flags without needing to write perl code.

Also, tos-sub-tosdir tool makes the %T flag magical. Instead of just
being replaced with $TOSDIR, it is replaced with all of the $TOSDIR
paths that point to actual folders. This allows for first class support
for out of tree platforms, as they will be able to use the %T syntax and
have it just work. This is convienent because if the platform ever gets
moved to tinyos-main it will just work.

Removed nesdoc; Use nesdoc-archive instead

nesdoc was another ncc style script, now you just call the python
scripts directly.

Removed mig and ncg

mig and ncg are more examples of magic scripts, mostly because they use
ncc. To remove them, I replaced all instances of mig with nescc-mig and
ncg with nescc-ncg. Then I added the correct argument to make sure they
still execute correctly.

This isn't as bad as it sounds due to $(NESC_PFLAGS) being very useful.
That variable basically replaces what ncc used to do.
Removed default-platform

default-platform wasn't really being used, so now an explicit target
must be provided to all tinyos-tools. Therefore -print-target is no
longer a reasonable option.
Streamlining Make system

Changing variable names to be more consistent and insightful.
Refactoring make microcontrollers

Reformating all of the platforms to use the common Makerule targets
among other things.

.rules files are now much more concise and duplicate much less.
Moved platform,family,sensor files to support/make

Updated the targets to pull in the correct platform
Reworking the TinyOS Make system

Moved -gcc to .rules; cleaned up variable names

Moved .c files to TOSMAKE_ADDITIONAL_INPUTS

Adding source files to PFLAGS causes mig and ncg to not work, so all
additional source files needed for compilation must be added to the
TOSMAKE_ADDITIONAL_INPUTS variable, and not PFLAGS.

make system: added check for cygwin

Sets TOSMAKE_CYGWIN to 1 if the app is being built with cygwin.

make system: Made variable names consistent

Variables meant to be set with env variables (if the defaults are not
ok):
TINYOS_MAKEDEFAULTS
TINYOS_MAKELOCAL
TINYOS_MAKERULES
TINYOS_MAKE_DIR
TINYOS_OS_DIR
TINYOS_ROOT_DIR
TINYOS_ROOT_DIR_ADDITIONAL

Variables that are common with many makefiles probaly should only be set
in other makefiles:
TOSMAKE_ADDITIONAL_INPUTS
TOSMAKE_AMADDR_STR
TOSMAKE_AM_GROUP
TOSMAKE_BINARY_FORMAT
TOSMAKE_BINARY_IN
TOSMAKE_BINARY_OUT
TOSMAKE_BUILD_DIR
TOSMAKE_CLEAN_EXTRA
TOSMAKE_CYGWIN
TOSMAKE_DOC_DIR
TOSMAKE_DO_REINSTALL
TOSMAKE_FLASH_CHIP
TOSMAKE_MAKE_PLATFORM_DIR
TOSMAKE_OS_DIR_ALL
TOSMAKE_PATH
TOSMAKE_PFLAGS_STD_INCLUDE
TOSMAKE_POST_EXE_DEPS
TOSMAKE_PRE_EXE_DEPS
TOSMAKE_PROGRAMMER_TYPE
TOSMAKE_TOS_NODE_ID_STR
TOSMAKE_VOLUME_ALLOCATOR_FLAGS
Moved targets and extras to their own folders
Updated sim, appdoc, doc, tosthreads, tosboot

Combined sim so that -fast and -sf just configure sim.extra, and are
not full duplicates.

Appdoc now modifies doc.extra by adding the --app flag.
Make: Updated README

Added information about revision 3 of the TinyOS make system to the
README file in the make folder.

Also added information on how to change a version 2 platform to version
3.
Docs: Updated READMEs

I cleaned up the main readme, as well as 00a and 00b. Mostly just adding
information and converting them to markdown so they are easier to read
on github.
tools: Fix compiling issues on Mac