Make 'ct upload' verify SCTs
Merge pull request #142 from AlCutter/verifysct

Make 'ct upload' verify SCTs
Reset the errno before relying on it in strtol.
Bound get-entries to what we have.

Fixes #138.
Limit the number of entries returned per request.

Fixes #137.
Forward-declaring Database<> isn't enough in log_lookup.h.

The inline LogLookup<>::GetEntry method uses members of Database<>, so a
forward declaration of Database<> is not sufficient.
Remove the CTLogManager class.

It is only a passthrough shim, have the HttpHandler class call others directly.
Make Frontend optional for HttpHandler.

If no Frontend is passed in, the add-chain and add-pre-chain handlers won't
be installed (this will be a read-ony log).
Rework the ParseJsonBuffer function to get one chunk at a time.
Move to new OpenSSL 1.0.2 API.
Use the Database directly from HttpHandler::GetEntries.

And also CTUDPDNSServer::LeafHash, for completeness.
Make HttpHandler::GetEntries non-blocking.

This operation goes to disk with both our Database implementations, so do it
on the thread pool, rather than synchronously.
Rewrite TBSCertificate, using the new OpenSSL-1.0.2 API.

Tested with 1.0.2-beta3 and 1.0.1.
remove redundant check
Merge branch 'ekasper-102'
Get rid of unnecessary construction.
Correct spacing.
Add a JsonObject ctor to parse from an evbuffer.
Fix a bug in the evbuffer JsonObject constructor.

We were always reading the first chunk of the buffer, so in the case of a
fragmented buffer, it would not work correctly.

Added a test, as well.