expand permission check to remote array
expand permission check to remote array

This check was preventing multiple private images from different
users on the same server from loading on the same page.
It was only checking for permission for the single id returned by the
remote_user() function rather than the multiple possible autheniticated
id's stored in the remote arry session variable.

friendica/friendica,fabrixxm/friendica,tobiasd/friendica,friendica/friendica,annando/friendica,annando/friendica,annando/friendica,annando/friendica,tobiasd/friendica,fabrixxm/friendica,fabrixxm/friendica,fabrixxm/friendica,friendica/friendica,tobiasd/friendica,fabrixxm/friendica,tobiasd/friendica,annando/friendica,friendica/friendica,tobiasd/friendica,friendica/friendica