There are quite a few questions so I will try to go through them one by one.
The only way you can include a link in the YAML front matter is in the [hyperlinks](example.com)
format. This is just due to the order the Jekyll renders the page.
I took your example code and changed the rendering of the caption to include the markdownify
filter and it worked as expected (after removing the second line from the caption).
{% if pic.caption %}<p>{{ pic.caption | markdownify }}</p>{% endif %}
The caption can have line breaks in it. If you DO want them preserved in the output, use:
caption: |
Caption with [hyperlinks](example.com).
Line break preserved
And another
Note the extra line break between each line, and the two spaces at the start of each line of text. If you do not want the line breaks in the output use the ">" character instead of "|".
All of this has been tested using the kramdown markdown parser in Jekyll.