connection.h: zap paragraph from my thesis

Following the transition from libneubot (described in my thesis)
to libight, that paragraph is now slightly (and will become even
more) misleading.
connection.h: struct => class
connection: make read_into, write_from official API

These two functions were not official API because of the way
in which I wanted to organize libneubot.

There is no need to "hide" these two functions in libight.
connection: remove the buffered read/write code

In libneubot the connection needed to implement buffering both for
reading and for writing. In fact, libneubot idea was to implement
buffering efficiently in C/C++ and to implement higher level stuff
either in Python or in Java.

This is no longer the case. Libight is fully written in C++. So
we can move the buffering outside IghtConnection.

Specifically, this commit removes the buffering. In another pull
request, I will take the code removed here and use it to implement
a buffer class as a wrapper of `evbuffer`.
connection.h: correct #define guard name
connection.h: use minimal include path
connection: simplify read path

Pass directly to the callback the evbuffer that contains all
the data that we have read so far.
connection.h: we only need one connect()
connection: re-add puts() and write() as inline

I removed too much. It is handy to have puts() and write().
connection: inline as much code as possible
Remove connection's factory methods

As discussed with @hellais, the factory methods need to go.

We discussed the possiblity of having a do-nothing constructor,
coupled with attach() and connect().

Since there is the possibility to provide a default value for
variables, however, I've decided to have two constructors, one
for attaching to a socket, the other for connecting.

I prefer this solution because it leads to a simpler API
and, therefore, to less lines of code.

Compare:

    auto conn1 = new IghtConnection(so);
    auto conn2 = new IghtConnection("PF_INET", "www.google.com", "80");

with:

    auto conn1 = new IghtConnection();
    auto conn2 = new IghtConnection();

    conn1->attach(so);
    conn2->connect("PF_INET", "www.google.com", "80");
connection: do not enable read on connect

As we do on attach(), let the user decide whether to enable
read when connect() succeeds.
connection: replace protocol with slot functions

To reduce the number of functions, I've also decided to tell the
caller about EOF (and, in the future, a timeout) using the on_error()
slot rather than using a dedicated slot.

While there, move the regression test below `test/net`.
connection: fix to repair build on Linux
Make IghtConnection movable

This is implemented by renaming IghtConnection as IghtConnectionState
and by creating an IghtConnection that wraps IghtConnectionState.

IghtConnectionState works as before. Namely, it passes to libevent
the `this` pointer. This fact makes IghtConnectionState non movable.

IghtConnection allocates IghtConectionState on the heap. IghtConnection
is movable because its memory address is not passed to libevent and
because the move operation passes the IghtConnectionState pointer along.

While there, merge the "attach" and "connect" constructors of the
IghtConnectionState class into a single constructor.

While there, throw bad_alloc on memory error (rather than runtime_error).

While there, minimize the headers used.

Of course, update the test program accordingly.
connection: std::move explicitly the slot functions
.gitignore: revert changes to make smooth merge possible

The changes that this branch applies to .gitignore prevent a smooth merge
of this branch with `add-libevent-abstraction-layer-step1`.

Since the change is small, and since solving conflicts manually is a
bit annoying, revert the change done by this branch to .gitignore.

I will reapply the changes once this branch is merged.
Revert more changes to make concurrent work easier

There is a lesson in here: if I make too many changes within a branch, I
cannot work concurrently on other stuff.

In this case, in particular, I cannot work to add the new buffer code and
the regression tests, because this conflicts with me moving the test program
for the connection inside the `test/net` folder.
Merge branch 'rework-connection-api'

* rework-connection-api:
  Revert more changes to make concurrent work easier
  .gitignore: revert changes to make smooth merge possible
  connection: std::move explicitly the slot functions
  Make IghtConnection movable
  connection: fix to repair build on Linux
  connection: replace protocol with slot functions
  connection: do not enable read on connect
  Remove connection's factory methods
  connection: inline as much code as possible
  connection: re-add puts() and write() as inline
  connection.h: we only need one connect()
  connection: simplify read path
  connection.h: use minimal include path
  connection.h: correct #define guard name
  connection: remove the buffered read/write code
  connection: make read_into, write_from official API
  connection.h: struct => class
  connection.h: zap paragraph from my thesis