Fix reading a video using libav (correct API usage)
varies fixes for new build system via smvv

I cannot merge all @smvv's changes due the the fact that I cannot
understand all the dependencies of these makefiles, and the newly
changed tld.c file cannot pass my test video. Will do these merges
later, but for now, only limited changes are merged to mainline.

Fix C spec violation error due to missing -std=c99

Various build system and configure script improvements

Move configure script to root directory

Fix undeclared constants (previously included by png.h)

The undeclared constants are defined in zlib.h. Previously, png.h included
zlib.h, but recent versions of libpng (version >= 1.5) do not include zlib.h
anymore.

This commit will solve the following errors:

lib/io/_ccv_io_libpng.c: In function ‘_ccv_write_png_fd’:
lib/io/_ccv_io_libpng.c:55:23: error: ‘MAX_MEM_LEVEL’ undeclared (first use in
this function)
lib/io/_ccv_io_libpng.c:55:23: note: each undeclared identifier is reported
only once for each function it appears in
lib/io/_ccv_io_libpng.c:63:38: error: ‘Z_BEST_SPEED’ undeclared (first use in
this function)
lib/io/_ccv_io_libpng.c:65:40: error: ‘Z_HUFFMAN_ONLY’ undeclared (first use in
this function)

Rewrote build system for proper dependency tracking

This commit makes it also possible to build all binaries and the ccv library in
parallel using e.g. make -j4.

Add build/lib to ld's library search path

Cleanup and mark object files as precious (aka "do-not-remove")

Use conditional assignment for CC, CFLAGS and LDFLAGS

Integrate test/ in central build system (work in progress)

Fix C spec violation error due to missing -std=c99

Add test/ directory to header include path
the first commit for HTTP API
a bug in varadic parameter of ccv_cache_generate_signature

ccv_cache_generate_signature recognizes the end of the signature by the
ending 0. However, a 0 is 32-bit integer, and we use type uint64_t for
signature, that will cause a problem especially on 32-bit system. This
diff fixed that problem by pass in a typed 0.

no type safe varadic parameter is just evil, lucky that ccv_read is type
safe.
encounter the problem with libdispatch

have to roll out my own version of dispatch_main_queue :-(
integrated a multipart_parser into libeeb
adjusted several scale factors for lucas kanade optical flow
changed default tld param a bit because the scale factor changed in lk
Altered the build system to better accommodate building on Mac OS X. Checks to see if Xcode command line tools are installed and if not uses xcrun to run relevant commands. Gives indication which Xcode package is selected using xcode-select. Asks which SDK should be used to build against. Asks which architecture should be used to build.
Moved asking for the architecture to build inside of the check for Darwin if block. This is because clang only supports -arch on Darwin (Mac OS X) systems currently.
Merge pull request #47 from mledford/xcode-build-changes

Moved asking for the architecture to build inside of the check for Darwin if block.
added a bit support for http
have the coord_parser done in http server
can return json of bbf now
makes dpm works too
changes to makefile
Merge remote-tracking branch 'upstream/unstable' into r0.3-rc1

Conflicts:
	.gitignore
	bin/makefile
	lib/makefile