make _add_data public and allow empty projects

Make _add_data public, renaming it to add_data, and allow it to be
used instead of a project directory. This requires that empty projects
be allowed, since a Project object must be created before the add_data
method can be called. The project path parameter was made optional (but
make mandatory in AM.pm). A new initialization method was created, and
several array variable initializations were added to prevent errors in
the tests involving empty projects.

Comment, document, and update TODO where the opportunity presents
itself. Note especially that there are several places where input
checking is needed.