after inserting macro, put cursor/selection somewhere logical

It looks like I broke this when I upgraded macros, so I think this restores it to something sane.

If the user selected text before inserting a macro, then highlight the inserted macro text.  
If the user had not selected text, put the cursor after the inserted macro text.  
If the user had not selected text and used a comment formatter like \*\*bold\*\*, put the cursor inside the formatting marks.