Add classes for constructing a search tree

This structure supports basic boolean operations (AND, OR, NOT)
and can handle queries such as asset condition, type, path, etc...
Add pyparsing grammar for a basic inventory query language
Set up parse actions to construct search trees from parse trees
Wrap search tree execution up in a function returning assets

query.query(...) is a nice high-level function taking in a query
string and returning (via a generator) all of the matching parts.
Add an SR tool script for running inventory queries

It can return a list of matching part codes or, by default, the
matching filenames.
Use fnmatch (glob-style) for path matching

Note: there is an implicit '*' at the end of the pattern so that
queries like: `path:dir` will match all files under dir/*; it's
not particularly useful otherwise.
Make keywords caseless
Allow use of '!' in place of 'NOT' in queries
Make match(...) match on lists and match_single on one node

match(nodes) now filters nodes for those elements that return True
when run through the corresponding match_single(node) function.

This change was made as it makes search tree (although I guess it
wouldn't be much of a search tree then) nodes able to return nodes
different to those passed in.  This could be useful, for example,
as a way of returning the parent of matching parts.
Rejuggle AST so NonTerminals must implement match() themselves

Terminals must implement single_match() which can then be used
by a default match() for Terminals that uses filter().  match()
must take a list of parts and return a (possible empty) list of
parts.  AND, OR, NOT will filter the output lists accordingly,
but generalising this way allows functions (comming soon) to
return different parts to the ones passed in.
Add grammar, parse action and AST node for functions

Functions will take the form:

  <function name> of <some expression>
Add a 'parent' function that returns the parent of matches

e.g.:
     parent of type:power-board-sr13.f

...will return the parent item in the inventory tree.
Add a 'children' function
Add a 'siblings' function

Note that this function returns the children of the parent of a
node that are not the node itself.
Add an S-expression for the function AST node
Implement an 'assy' as in 'is an assembly' rule
Remove some duplicate code that was calling functions twice
Implement 'descendant' function
Fix: copy pasta error, 'left' -> 'node'
Modify grammar to allow NOT to be used on function output

Before, NOT could only work on non-function expressions.