Comments cleanup

Improve the wording of some docstrings and comments.
Quote functions

Quote functions with #'. This is just a legibility convention;
it doesn't make the code any faster. Cf. commit 21b0773.
Add mouse support

The mouse dragging function from mouse.el are copied and adapted to
evil. Clicking and dragging with the mouse does not activate the
region but the appropriate visual state, otherwise those functions
behave as Emacs' own functions. This addresses #158.
Update X selection according to visual state region

When *selecting* some visual region then the X selection should be
updated according to the values of `x-select-enable-primary' and
`x-select-enable-clipboard'.

The default Emacs behavior is to update the X selection whenever the
mark is changed if `select-active-regions' is non-nil. This usually
interferes with Evil visual state because then the visual selection
does not correspond to the Emacs region. This patch sets this variable
to temporarily to nil during visual state so Evil takes responsibility
for the X selection. The X selection is updated in
`evil-visual-post-command' by calling `x-select-text' with the
appropriate values.

This update does not work in block visual state.

This addresses issue #110.
This addresses issue #158.
Add `evil-exit-visual-and-repeat'

This is a special command to be bound in visual state. It should be
used if some command can be called in visual state but should be
actually called in normal state. It simply exits visual state and is
ignored by the repeat system. After stopping visual state it resends
the event by which it has been invoked. Thus the same event that
invoked `evil-exit-visual-and-repeat' is resend but this time in
normal state. The command that should be executed must be bound to the
same event but in normal state.
Add repeat recording insert-at-point

This recording style simply records a single insertion using an
after-change-functions hook. The insertion is always repeated at
point, in contrast to usual change recording.
Allow repeat recording of mouse events

If a mouse event is bound to some function with non-nil record
function, then it is record. Thus mouse commands can be recorded but
they need a special recording function, recording by event is
impossible.
Record `mouse-yank-primary'

This mouse event (pressing middle mouse button to insert text from
primary selection) is recorded using insert-at-point. If it is called
during visual state, visual state is stopped before recording using
`evil-exit-visual-and-repeat' because otherwise the visual state would
be reactivated when repeating the command.

This addresses issue #158.
Maybe copy mouse-selected region to kill-ring

This is according to the usual behavior of Emacs mouse handling.
Though it has to take core of the special region defined by visual
state.
Add mouse-2 binding to insert state

In Emacs 23 we have to bind mouse-2 to `mouse-yank-primary' in insert
state, too. By default it's bound to `mouse-yank-at-click' which is
effectively a `yank' function and not an insert function. The problem
with this function is that it pretends itself being a `yank' command.
On the one hand this confuses the repeat system (changes
`this-command') and on the other hand a repeated `yank' is differently
from an insert command (always inserts the actual content of the
kill-ring).
Make `mouse-yank-secondary' repeatable

Analogous to `mouse-yank-primary'.
Cleanup comments in mouse handling functions.
Use `auto-hscroll-mode' instead of `automatic-hscrolling'

The latter is obsolete since Emacs 22.2.
Add `evil-mouse--remap-link-click-p'

This is a copy of `mouse--remap-link-click-p' which is only available
in Emacs 24.
Disable region during `evil-ex-eval'

When executing an ex command the region (i.e. transient-mark-mode)
should be deactivated. Otherwise the visual region will be passed to
an operator instead of the (default) ex-region.
This addresses issue #175.
Highlight zero size matches/substitutes

Zero size matches are invisible but their substitute may not be.
Therefore empty overlays are created in this case.
Handle zero size matches in `evil-ex-substitute' on whole lines

If the match is of zero size and at the beginning of a line then the
first line after the select region matches two when using
`perform-replace'. The reason is that a zero size match in the case
does not exceed the region.

Therefore the region is reduced by one character before calling
`perform-replace' if the last character in the region is a newline.
This corresponds to the interactive highlighting.

This addresses issue #175.
Guard existence of `x-select-text'

This function is not available in terminal mode.
Add GPL 3 license information to all source files

The headers of all source files are updated to be more standard
conform and include the license information. Furthermore the license
is put in the COPYING file.
Test for `ns-initialized' before calling `x-select-text'

On Mac OS X `x-select-text' may fail if OpenStep is not initialized
properly, even if `x-select-text' is defined. Now we check explicitly
the value of `ns-initialized' which should be defined and nil in this
case.