Refactored to remove duplicated radio_menu code
Fixed bug causing tutorials.name key to lose value

It turns out that filter is a generator in Python 3.
Oops...
Fixes regression in 2e4ffe2537b408f50eb247bfc45c8e8ce16a23ac

It turns out that ast was not extraneous; it just wasn't noted as being
necessary, so PEP8 flagged it for removal.

Added note that the ast import must be present in order for the static
analysis code to function.
TestsListbox now sizes to fit the number of tests
Added recursive decorator for ast nodes

Nodes may now be visited recursively by prefixing them with
`@TutorialNodeVisitor.visit_recursively`.

Visitor classes must now inherit from TutorialNodeVisitor.

Closes #19
Fixed bug in append detection
Added TutorialNodeVisitor.identifier method

Certain visit_X methods in AST can receive as arguments nodes of different
types.  The Python grammar used by ast defines certain attributes on those
nodes which may differ.

It would be possible to check for the expected type of node at runtime,
but this is kludgey and prone to error.

The TutorialNodeVisitor.identifier method extracts the identifier from a
given node, if possible.  It does this using the grammar definition.  If
an identifier cannot be extracted, a StaticAnalysisError is raised.  This
is appropriate, as all attempts to extract the identifier of a node with
no identifier is by definition a static analysis error, not an error in
the student code.

This should be used when implementing #15
Deleted old .tut file for recursive_digits2
Added TutorialNodeVisitor.involved_identifiers method

It's often necessary to check if a student has used a particular
identifier in a particular context.

Depending on the type of node, this can be quite an involved process.
For example, a student might write extremely convoluted if statements,
where we expect only a simple one.

TutorialNodeVisitor.involved_identifiers will recursively determine all
identifiers which have been used in a statement.

So, for example, if the student writes this statement:

    if x > 3 and (y or z < 4):
        pass

then TutorialNodeVisitor.involved_identifiers in the context of the if
statement (ie visit_If) will return:

    ['x', 'y', 'z']

even though the tree itself is extremely complex.

The order of identifiers is undefined, but will broadly be depth-first.

This will be useful in implementing #15
Fixed errors to be independent
Added recursive_digits2.tut

Note that the tester currently doesn't play nice with recursive functions.
Replaced run_student_code with run_in_student_context

StudentTestCase.run_in_student_context will take a function object and
execute it in the context of the student code.

This is intended to be used for obtaining test results.  The output of the
function will be returned.

Functions can contain arbitrary code, eg:

    def test_things(self):
        def _get_results(self):
	    first_result = dec2base(10, 10)
	    second_result = dec2base(9, 2)

	    return first_result, second_result

	result = self.run_in_student_context(_get_results)

Because functions are run in the context of the student code, they may
reference any object which is (or should be) defined in that code.  The
flip side of that is that they *cannot* reference objects defined in the
local scope (IRRESPECTIVE OF THE USUAL CLOSURE RULES).

See #25 for more discussion on this.

This commit also updates recursive_digits2.tut to use the new approach,
but not any of the other tutorial problems.
Updated fun1.tut to new test format
Added note regarding removing student_function_name

This should be considered a TODO on #25

Because we no longer extract the student function, there's actually no
need to know about its name.  It can therefore be removed from tester.py
(and I will do so soon).

However, keeping the variable in the config file may still be useful, as
it enables the useful anlysis result of 'you haven't actually defined that
function, silly'.

Unsure whether that's worth the added screwing around, though.
Fix a bug in the Makefile.

(The tutorial creation script needs to delete files before recreating them.)
Locals now properly override globals
Added class_rect.tut in new format

Tests are still WIP, but commit is stable
Finalised class_rect.tut tests

The description for this problem will still need to be updated (eg to
remove examples, per #24).
Updated list2.tut to use .run_in_student_context
Merge pull request #27 from CSSE1001/tests_framework

Added new tests framework (which runs arbitrary code in the student's context) and updated tutorial problems.