Add media_isexternal

To simplify testing whether external media is given. This is the case when the media id starts with http,https or ftp.

Included tests.
Applied overall.

(when #223 is applied the last occurrence in `inc/common.php` can be updated too)