Clean up `xprofile_avatar_upload_dir()`:

* Brackets
* Inline documentation
* Allow use of the `$directory` parameter (for a custom avatar path)

git-svn-id: https://buddypress.svn.wordpress.org/trunk@8809 cdf35c40-ae34-48e0-9cc9-0c9da1808c22