- Contact::getPublicIdByUserId() wrongly returns 0 when $uid doesn't exist, which is an existing albeit incomplete account record that trips the avatar URL generation down the line.
- This prevents an enumeration attack against avatar pictures
- Replace several DB calls to `contact` table with `account-view` or `account-user-view`
- Remove unused parameter photo_size from Directory::formatEntry
- moved constants GRAVITY_* from boot.php to Friendica\Model\Item
- also rewrote some array initialization:
From:
````
<?php
$arr = [];
$arr['foo'] = "FOO";
````
To:
````
<?php
$arr['foo'] = "FOO";
````
- added a few type-hints