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