Setup test for CRDTs upgrades, currently only 1.4 counters
Allow cover_modules and cover_apps to be per test module

Instead of one giant list in the config file, use module attributes to
indicate which apps/modules a particular test is intended to test.

This helps reduce noise when doing a complete cover run because lots of
the tests don't test things like riak_control or riak_repl.
Fix an error that can lead to failure of tests using replication2_pg

Fix an error that can lead to failure of tests using
replication2_pg:test_pg_proxy test case. A protocol buffers connection
is established to a node in the "B" cluster, the leader node from that
cluster is shut down, and then that protocol buffers connection is
used to exercise proxy_get. If the connection was established to the
former leader and that is subsequently shut down it can cause the test
to stall and eventually fail. This changes that test to establish a
new connection to a node remaining in the "B" cluster to use for the
proxy_get and prevents the test from stalling.
Update README about cover changes
Refactor test to assert downgrade.

When performing the test of object reformatting through replication,
assert that if we happen to downgrade the format we can still read the
keys which have been replicated.
Add basic moving target stats test.

Use this as a platform to start testing reports of missing stats from
replication.
If the test does not define coverage modules/apps use what is in the config

To help in the migration to annotated riak_tests, allow the global cover
lists in the riak_test config to be used as a fallback for tests with
no annotations.
Safer mod_src, damm NIFs
improve riak_test bash completion

Add missing riak_test options. Allow completion to work if riak_test is
invoked as ./riak_test or a similar pathname. Change the grep for "confirm"
to "confirm/0", which should be found in a test module export, so it
doesn't accidentally catch the plain word "confirm" in a comment in a
module that shouldn't be part of the testname completion. The
_get_comp_words_by_ref helper function is not available by default on OS X,
so add code to compensate for that case. Use a local variable to capture
the grep output, rather than overwriting a global variable.
Call verify_counters during the upgrade
Merge branch 'er/verify_dt_upgrade'
Merge pull request #590 from basho/vinoski/bash-completion

improve riak_test bash completion
Avoid failure in verify_counter_capabilities after node upgrade

Establish a new PB connection to the legacy node after it is upgraded
in order to avoid a failure. The PB connection may close if the node
upgrade takes too long and its reuse in such a case can lead to test
failure because use of the pid returns {error, disconnected} errors.
Merge branch 'bugfix/replication2-pg-test-pg-proxy'
Merge pull request #587 from basho/feature/csm/downgrade-rt

Refactor test to assert downgrade.
Merge pull request #588 from basho/feature/csm/repl-stats-1

Add basic moving target stats test.
Wait for realtime connections after node upgrades in replication tests

Prior to Riak 1.4.8 replication registers as a service prior to
completing all initialization tasks including establishing realtime
connections to sink clusters. This leads to a race condition in the
replication_upgrade and replication2_upgrade tests where the test may
begin writing data to the source cluster to verify the function of
realtime replication before the most recently upgraded node
establishes a connection to the sink cluster. The result of this is
that the data is silently discarded by the realtime replication system
and the test fails because all of the expected data is not replicated
and able to be read on the sink cluster. Change the
replication_upgrade and replication2_upgrade tests to explicitly wait
for the realtime connection to be established after each source
cluster node is upgraded before proceeding with the test.
Merge branch 'bugfix/verify-counter-capabilities-failure'
Merge branch 'bugfix/repl-upgrade-wait-for-rt-conn'
support for anonymous function intercepts

Allow intercept functions passed to rt_intercept:add/2 to be anonymous. In
compiled code they can either be a plain anonymous function, assuming they
don't use any variables from the surrounding context, or they can be a
2-tuple like this:

{[FreeVar1, ...],
 fun(Arg1, ...) -> ... end}

where FreeVar1 etc. is a list of free variables to be closed over so that
they can be used within the anonymous function. For making interactive
calls to rt_intercept:add/2 from the Erlang shell, only the anonymous
function form is required, even if it uses free variables, though the
2-tuple form is also acceptable.

For compiled code, support for anonymous intercept functions is implemented
via a parse transform, and so to use anonymous functions the intercept
structure(s) containing them must be defined directly inline as part of the
final argument to rt_intercept:add/2, i.e., they cannot be first assigned
to a variable that is then used within the argument. This is because the
value of such a variable might not be visible to the parse transform.

Add a description of anonymous function intercepts to the README.