Add filter callback option to post type list func

Will be used by the comment and comment removed points hooks to filter
out post types that don’t support comments.

See #96

(cherry picked from commit 36bc423db1160071f64e35944bb0417317aaae06)
Support post type filtering in post type base hook

Also add a function to filter based on comment support, to be used by
the Comment and Comment Removed points hooks.

See #96

(cherry picked from commit fa21564e5df9d760c75b2d2ab865ca45b3b0d6c1)
Only list post types supporting comments in hooks

The Comment and Comment Removed points hooks only make sense for post
types that actually support comments.

See #96

(cherry picked from commit 553563f3c9e5a7d3319cdfb0c1c88d056a581436)
Set the charset when creating the database

Includes the following database schema changes:

- We now set the charset and collation, like WordPress core does.
- We don’t try to specify a name for `PRIMARY` keys, since they can’t
be named and `dbDelta()` chokes on them.
- The `points_type` and `log_type` fields of the points logs table are
`VARCHAR(255)` instead of `256`, for compatibility with MySQL 5.0.3,
and because `dbDelta()` tries to create duplicate keys otherwise (the
key names are returned from the database with the length, 255, appended
to them, and don’t match the names in the SQL schema).

The SQL schema has been moved into a function, and is now fully
parseable by `dbDelta()`, which means that it can be used to update the
database, not just create it.

See #97

(cherry picked from commit 98595862ae1bc49d8577e3f9fb0f95bc3c7e10d4)
Update the db table charsets on update to 1.5.1

See #97

(cherry picked from commit 3bf9ac62718b5c7378cb2b54e2aea675f739ecea)
Test that updated charset stores Cyrillic char's

See #97

(cherry picked from commit 69f406d16c4387144f436323e39a6a35a4a9c8bd)
Backporting #96 to 1.5.1

See #96

(cherry picked from commit 6508f7667b0f668e5c6bc750240521e681218378)
Do not attempt to ALTER tables in the update tests

Doing this causes the database transaction to be committed.

We still alter tables in the 1.5.1 update test, but we `ROLLBACK` all
changes, so the database stays clean.

See #97

(cherry picked from commit ca4fbc134b6e947031f80a53996e5c9824c88275)
Call parent::tearDown() in the points test case

Otherwise, all of the `_drop_temporary_tables()` methods don’t get
removed, causing the 1.5.1 update tests not to work. It causes other
mischief as well, including not reporting the use of deprecated stuff,
like we were actually using in the comment and post points hook and
1.2.0 update tests.

See #97

(cherry picked from commit ed8097cb15ea5e2a230f331aec64e887dee3780e)
Don't try to test the charset before 1.5.1 update

We aren’t guaranteed that the charset won’t be UTF8 already (as it is
on Travis CI).

See #97

(cherry picked from commit dcb68cc9c5b90cdf5f2e34ac88f0a60e936e6fc9)
Don't substitute an empty query for ALTER TABLE

On WordPress 3.8 and before, an empty query causes errors. I think this
is because newer version use mysqli.

See #97

(cherry picked from commit 6bed0003c33b6b54ee6e13a3d4573d008f0eb7d0)
Recreate the points type in the 1.5.1 update test

Otherwise it will (rightly) fail on multisite. I suppose the reason it
doesn’t fail on single-site tests is because of differences is caching.

Moves the points type creation to a method separate from `setUp()` so
that it is reusable.

See #97

(cherry picked from commit 4fcfc342729cba5fef494289eec31a12c3a9ad0e)