pkgIndex: move package require to usage files

TCL advises against putting require statements in the index file.

    http://wiki.tcl.tk/5900

Errors like these can otherwise happen:

error reading package index file pkgIndex.tcl: too many nested
evaluations (infinite loop?)
pkgIndex: remove reference to none existing file expect.tcl
Merge pull request #14 from neg/pkgindex

Pkgindex
Add boolean value coding style to README
Add GPL2 information and file headers

This software is as the README file has always indicated
but not explicitly stated licensed under GPL2.

I have written this code on my spare time to manage my server park. Now
that the interest for it is growing I decided to add more explicit
licensing information.

Also update the README layout to look more like asciidoc and more
cleanly present the license information.
Fix incorrect GPL version in e6125a (v3 -> v2)

A copy paste error in e6125a resulted in the wrong GLP version. Again,
9pm is and has always been intended to be licensed under GPL v2.
require expect in setup.tcl

This should have been done in 6a75f81.
shell: always set active_shell

Alias of the active shell needs to be stored in int::active_shell
disregarding of if it is a new shell or we are switching back to a
existing one.
shell: verify you have a shell before you can push it

There is no point in trying to push a shell if you do not have one.
Merge pull request #17 from neg/bugfix

require expect in setup.tcl
Merge pull request #18 from neg/shellfixes

Shellfixes
shell: only check for active shell when closing if it is set

Solves the bug:

shell foo
shell bar
shell foo
close_shell foo
close_shell bar
shell: add unittests for shell_{push,pop}

Very basic tests to verify expected behavior.
shell: add unittests to test int::active_shell

Check that the internal variable int::active_shell is updated correctly
when spawing, switching and closing shells.
Merge pull request #20 from neg/bugfix

shell: only check for active shell when closing if it is set
Merge pull request #19 from neg/shelltests

Shelltests
Introduce namespaces (breaking API)

This is a major refactoring. Expect breakage.

The existing setup, where 9pm resided in the global scope (and ::int::)
didn't scale and was extremely fragile.

Reasons for this patch
----------------------
Naming collision
If a user named his function get_time and returned a unix timestamp it would
override the get_time function used by 9pm to add timestamps, resulting in
logs switching to unix timestamps half way through the execution. There where
_many_ more commonly named variables and procedures in the global scope,
creating a minefield for users.

Scalability
As the ::int namespace was the only safe-haven for arbitrary naming of internal
variables and procedures it rapidly filled with things related to all parts of
the framework. This obviously didn't scale very well.

Whats new
---------
The new top level namespace is 9pm. Under 9pm resides various sub-namespaces
that divides the code into logical parts, like "output", "cmd", "shell" and
"ssh" to name a few.

All these sub-namespaces are unique to tcl/expect/tcllib. Meaning that the user
could neglect the 9pm by recursively importing using "namespace path ::9pm".

API changes (neglecting ::9pm)
------------------------------
shell               -> shell::open
close_shell         -> shell::close

ssh                 -> ssh::con

execute             -> cmd::execute
start               -> cmd::start
capture             -> cmd::capture
finish              -> cmd::finish

scp                 -> scp::transfer, scp::put, scp::get

output              -> output::warning, output::debug, output::debug2,
                       output::info, output::note
result              -> output::plan, output::ok, output::fail, output::skip

get_node_info       -> conf::get
get_req_node_info   -> conf::get_req

get_time                    -> misc::get::time
get_unix_time               -> misc::get::unix_time
get_rand_int                -> misc::get::rand_int
get_rand_str                -> misc::get::rand_str
get_script_path             -> misc::get::script_path
get_script_name             -> misc::get::script_name
get_running_script_path     -> misc::get::running_script_path
get_running_script_name     -> misc::get::running_script_name
prepend_path                -> misc::prepend_path

Under the hood
--------------
Using namespaces to limit scopes means that shell data can be stored in
9pm::shell::data while config data can be stored in 9pm::conf::data. These
are then accessed by procedures within the same scope using simply $data.
This is a huge advantage to the old code where all different things where
stored in the same place (the ::int namepsace), like int::shell_data and
int::config.