Points shortcode: option to show author's points

If the `user_id` attribute of the `[wordpoints_points]` shortcode is
`post_author` we’ll display the points of the author of the current
post.

Includes unit tests.

Fixes #206
Merge branch 'issue-206'
Fix points hook multi-number assignment

When new points hooks are created they need to be assigned a unique ID,
which is comprised of a base slug for the hook type and an ascending ID
number. The ID number for a hook template needs to be `__i__`, which
will be replaced with the incremented multi number when a new hook is
created from the template.

During cleanup in #77, we’ve changed the way the template ID in a hook
template was generated. The result was that the `$number` was being
used instead of `__i__`. The number would in the case of a hook
template be 0.

The result of this inadvertent change is that the hook would be saved,
but it would not fire, because the 0 hook number is reserved for hook
templates.

This fixes the problem by setting the hook ID in templates
appropriately without respect to the value of the `$number`.
Previously, we only attempted to correct this if the `$number` was set
to a non-empty value, which meant that these things had to be handled
each time a hook template was displayed.

See #77
Introduce a comment received points hook

It will award a post author points when they receive a comment on one
of their posts. If the comment it removed, the transaction will be
automatically reversed.

To keep DRY, we introduce a new base class for comment approved points
hooks, and also use it for the Comment points hook.

See #111
Make sure the SERVER_NAME var is set in the tests

See WP25239
Merge branch 'issue-111'