Added t2171 - tup.run() from lua.

Sometimes it may still be useful to run external scripts, even from lua Tupfiles.
Added t2172 - tup.getrelativedir().

This helps figure out where you are relative to some root directory, which would usually be defined in a Tuprules.lua file somewhere up the tree.
Make 'len' argument optional in get_relative_dir()
Print indication when waiting for another tup instance

If another instance of tup is running somewhere (e.g. an autoupdating
monitor), running a second instance of tup will wait silently until the
first process finishes. This can be confusing and make users think that
tup has hung for some reason.

This commit adds a tup_try_flock method that allows tup to print a
message indicating why it's waiting.

The windows code is untested (don't have a box to test), but if my
reading for the MSDN docs is correct, it should work. It's not a very
complicated bit of code.
Fix Windows lock indication.

Apparently if the shared lock file was already locked, the open() from another tup process would fail with a "Bad pipe". Instead it seems we need to use the CreateFile() interface so that we can do the tup_try_flock() call. This required changed the tup_flock interface to use a tup_lock_t type so that it can be an int for POSIX and a HANDLE for Windows.

Also added flushing to the Windows printf wrapper so messages actually show up when they are printed.
win32: Check both 'foo/bar' and 'foo\bar' in node_exists().

This helps test code where we are checking for command strings and filenames, since they may vary with '/' and '\' depending on their origin.
lua external scripts should fail if the script fails.
win32: Ignore wide files that start with '\\'

According to Rendaw, this fixes the issue with \\WMIDataDevice on WinXP.
Fix tests on OSX.

Not sure why these started breaking.
Added t4156 - remove a generated dir and srcdir at the same time.

If things get removed in a particular order, we might end up with a non-existent tupid in the create_list. Obviously that is a bad idea. Instead we should convert a directory into a ghost node if its id is still in use as a srcid, and then delete it later.
Added t4157 - ignore UTF-8 byte-order-mark in Tupfiles.

Lua already seems to handle this fine, but the Tupfile parser did not. We just need to ignore the UTF-8 BOM if it's present when we fslurp() in a file.
dllinject.c: add nul: to list of ignored files
Update SQLite 3.8.0 -> 3.8.1
Add Tupfile.ini support. Obselete `tup init`

This commit seeks to obviate the explicit calling of `tup init`. When
tup is run, it will now search for both a `.tup` directory or
`Tupfile.ini` files on the path down to the root directory. If no `.tup`
directory is found, tup will consider the directory closest to the root
that had a `Tupfile.ini` file as the root of the project and automatically
call `tup init` in that directory.

To appease the idiom of `tup init && tup upd`, repeated calls to init
will print a warning indicating that tup has already been init'd, but
will still return success.
Remove `tup upd` command in favor of simply `tup`

This commit deprecates the command `tup upd` in favor of the simpler,
shorter command `tup`. Now that `tup init` is not required, there was only
one "basic" tup command remaining: upd. This allows for much easier
migration to tup for refugees from other "build systems", using tup is now
as simple as just typing 'tup'.

The command `tup upd` is preserved for legacy / backwards-compatability
reasons. It is silently accepted.
Update `test/tup.sh` to accommodate init, upd
Don't display usage information if 'tup foo' fails to build 'foo'.

The usage now only needs to be shown if we don't have a Tupfile.ini or .tup directory anywhere up the tree.
Move init_command to init.c