Save match data
Improved pre block matching

This is complete rewrite of the pre block matching routines,
with unit tests.  The previous implementation was inaccurate
and a drag on performance.  This should be much faster and
more accurate for pre blocks inside nested lists.

Use the four space rule for nested list items.  In a
sublist of level n, preformatted text must be indented
at least (n+1)*4 spaces.

Example:

   - List level 1 item 1
   - List level 1 item 2

     Second paragraph of item 2

        Nested pre block in item 2
        Four spaces past the marker

     Another paragraph of item 2

   - List level 1 item 3

       - List level 2 item 1
         Four spaces from higher-level the marker

            Nested pre block
            Four spaces past the previous marker

       - List level 2 item 2

           - List level 3 item 1

                 Nested pre block
Font lock and insertion for GFM quoted code blocks

Add `markdown-language-keyword-face' for highlighting the
optional language keyword.

Add `markdown-insert-gfm-code-block' for insertion, with
keybinding C-c C-s l (l for language).

Includes unit tests.

Thanks to Michael Dwyer, Donald Ephraim Curtis, and Matus Goljer for
patches related to matching GFM code blocks.  Thanks to Matus Goljer
for the insertion function.
Added before and after export hooks.
Delete temporary file created by test.
Thanks
Inline code regexp: ensure following character is not a backquote
Make temp filename and visited file the same
Smarter spacing when inserting horizontal rules
Add functions for ensuring blank lines before and after point

New functions markdown-ensure-blank-line-before and
markdown-ensure-blank-line-after.

Use new functions in markdown-insert-hr.
Improve header insertion functions

* Ensure blank lines before and after headers.
* Setext header insertion will prompt for header title when there
  is no active region.
* Generalize setext header insertion command to avoid repetition.
Use newer use-region-p when checking for active region.

Combine and simplify compatibility wrappers for XEmacs
and older Emacsen.
Add tests for blank line before and after functions

Do not move the point in markdown-ensure-blank-line-after.
Fontify buffer before string tests
Better documentation and tests for italic and bold regexps

Also fixes some edge cases regarding escaping, spaces, etc.
Bold, italic, link, and image insertion using region or word at point

These commands now use either the region, if there is an active region,
the current word, if the point is at a word, or else insert empty markup.

Cursor positioning is determined according to what should be entered
next.

Bold and italic insertion commands can be used to remove bold and
italic markup when the point is at either a bold or italic phrase.
Cursor position is maintained after the removal.

To support these changes, markdown-wrap-or-insert was rewritten to
accept a thing argument.  In the cases above, thing is 'word.
This function returns the bounds of the region or thing wrapped,
if any, or else it returns nil.
Remove unnecessary save-excursion
Return bounds of entire wrapped string in markdown-wrap-or-insert
Fix ATX header insertion, wrap line by default

Wrap the line by default when inserting ATX headers,
if no region is given.

Fix problems with inserting ATX headings at end of buffer,
and in properly ensuring the lines before and after are blank.
Suppress blank lines at beginning and end of buffer

Update markdown-ensure-blank-line-before and
markdown-ensure-blank-line-after.
Includes unit tests.