Inaccurate handling of srv_activity_count

Summary:
Feature: Logic error

This is a fix for upstream bug#72137

InnoDB increments srv_activity_count during commit and prepare.
The purpose of increment is to tell the background threads that
there may be some work for them to do.
A read only transaction e.g.: an autocommit select won't make
any changes that would require background threads to wake up.
This spurious wakeup and increment can actually lead to
unexpected behaviour. For example, the page_cleaner thread
will consider that the server is active and won't go in
background/idle flushing mode. Due to this even if there are
dirty pages in the buffer pool it won't flush them unless
necessitated by adaptive flushing.
The fix is to increment activity count during commit iff
the trx has modified something.

Test Plan: mtr

Reviewers: pivanof, darnaut, steaphan

Reviewed By: steaphan

Subscribers: CalvinSun, jtolmer, WebScaleSQL

Differential Revision: https://reviews.facebook.net/D20235