Fix some bugs in the outdenting for R code in non-R modes

This fix has a few components:

1. In 'r_matching_brace_outdent', the autoOutdent method attempted to
access the code model through 'this'. Unfortunately, 'codeModel' is not
actually available through 'this' since the reference is bound before it
ever gets to know about the code model. A simple 'hack' here is to add
the code model to those function signature.

2. The 'checkOutdent' and autoOutdent were not matching the signatures
correctly. This is understandable since the signature in our
RMatchingBraceOutdent diverged from that of Ace's MatchingBraceOutdent.
This is now fixed.

3. Although I don't really know why, the way that the
RMatchingBraceOutdent was mixed in to 'r.js' didn't seem to work (?), so
I followed the pattern in the other files.

Ironically, the combination of the two bugs above made R code
indentation for closing '}' work fine, but broke it in other modes.

Ultimately, this fixes a bug where reindenting R code within an .Rmd,
.Rnw, or .cpp file would produce formatted e.g. like:

    for (i in 1:10) {

        }

ie, the closing brace offset is now properly aligned in these files. It
(should) preverse indentation behaviour in vanilla R modes.