flux-module: fix segfault loading out of tree mod

flux-module would segfault in some cases when searching the module
path, if the glob matched a file that could not be dlopened or which
was not a module.
Merge pull request #32 from garlick/flux-module-segfault

flux-module: fix segfault loading out of tree mod
build: set a2x --destination-dir to $(builddir)

fixes issue #33
Merge pull request #37 from garlick/man-page-vpath

build: set a2x --destination-dir to $(builddir)
cmbd: fix -k option parsing segfault

Need to add a colon suffix in getopt or we get segfault using -kN
as opposed to --k-ary=N.
flux-start: add -o option, drop -k option

Allow passing of arbitrary options to the cmbd using -o.
Example:  flux start -o"-v,-k4"

Drop the -k-ary option which now can be specified this way.
flux-start: drop -M, -O options

Modules can be loaded dynamically via 'flux module load',
or the new -o option can be used to pass module options to cmbd.
Therefore, drop the module options from flux-start.
cmbd: rework module args

Add to the list of modules to load by repeating -Mname option.
name can be suffixed with a nodeset, as before, e.g. -Mjob[0].
Multiple modules cannot be passed in a single option.

Move module options from non-option arguments to -O option, also
specified multiple times, e.g. -Okvs:foo=bar -Okvs:a=b.

This should allow modules and options to be more easily passed from
flux-start(1) and similar using its -o option, e.g.
    flux-start -o"-Mkvs,-Okvs:foo=bar,-Mlive"
cmbd: add --quiet option

fixes issue #31
doc: update flux-start(1) options description
doc: add cmbd(1) man page
cmbd: add missing longopts[] entry for --quiet
Merge pull request #39 from garlick/command-args

simplify flux-start options
testsuite: add source files for sharness

Pull in  sharness.sh and aggregate-results.sh from git master
of the sharness project

 https://mlafeldt.github.io/sharness/
testsuite: add sharness tests

Add tests from sharness testsuite itself as 't0000-sharness.t'
(so that the tests testing the suite itself run first)
testsuite: add SHARNESS_TEST_NAME in place of SHARNESS_TEST_FILE

SHARNESS_TEST_FILE was used in a couple places in the creation
of new file names, and thus had to be sanitized to remove extension
or path prefix multiple times. Simplify this use by creating a
SHARNESS_TEST_NAME once, and using that where SHARNESS_TEST_FILE
was previously used.
testsuite: add SHARNESS_TEST_SRCDIR as path to source of sharness

If tests are run from a different directory than the sources, e.g.

 /path/to/test.t

Then SHARNESS_TEST_DIRECTORY (the current working directory) and
the source of the tests and sharness.sh itself are in different paths.
Differentiate these paths with SHARNESS_TEST_SRCDIR and use this
to load sharness.sh in subdir tests.

This will also be useful when running tests from $srcdir in a $builddir
of a VPATH build of some project.
testsuite: Allow sharness extensions in srcdir/sharness.d

Projects may want to extend sharness without directly modifying
the sharness.sh test library. This patch adds support for a series
of `extensions` to be loaded from $SHARNESS_TEST_SRCDIR/sharness.d/*.sh
which may be used to add new functions, unset environment variables,
extend the PATH, etc.
testsuite: load sharness.sh from same directory as test

When tests are run from a builddir (or any directory different
from `.'), ensure we load the `sharness' library from the
same directory.

Instead of the idiom

 . ./sharness.sh

we now prefer

 . `dirname $0`/sharness.sh
testsuite: print passing tests in green

I like me some color output.