buffer: keep a count of number of times ::changed signal is connected

There is overhead involved in emitting changed signals, even when nothing is
connected. This adds a wrapper function to be used instead of g_signal_connect
that tags the buffer as a buffer that should be emitting changed signals.