(PUP-2237) Improve puppet-mode indentation, XEmacs compatibility

Handle a closing brace followed by a comma, which is the end of a
selector inside a resource.  Keep indentation at the same level in
that case.

Correctly indent the line following an array ending with :, which
is an array of resource names at the start of a resource definition.

Restore proper indentation following a line with a closing paren
and opening brace.

Properly highlight the resource name when setting defaults for that
resource.

Also clean up some places where \( or \) was used in a string to
represent a literal paren.  The backslash is extraneous here and is
ignored, so omit it.

Fix compatibility with XEmacs.
(PUP-2237) Fix end of string in Emacs autoload for puppet-mode

Autoload file match patterns should end in \\' to match the actual
end of string, not $ to match end of line, just in case file names
contain newlines (not that this is horribly likely, but this is
Emacs best practice).
Merge pull request #2530 from rra/emacs

(PUP-2237) Updates to Emacs puppet-mode for indentation, XEmacs, file name matching