Fix PHP notice caused by copypasta
Second pass at BP Member profile integration
In dpa_is_single_user_achievements(), also check the current component and action.

Clears todo in function.
Added minor TODO for future investigation
Update all the places where we get the displayed user's ID to use a new helper function

This is the 3rd pass at BP profile integration.
Fix incorrect function declarations from parent class
Update dpa_user_avatar_link  to return correct link when integrating with BP

Removes TODO in function. Fourth pass at BP Member profile integration.
Clarify phpdoc for arguments for recently added functions
When adding Achievements item to BuddyBar, use the existing dpa_get_user_avatar_link helper function.
Add an "achievements" item to the Toolbar "profile" submenu (which is added by BuddyPress).
Fix rewrite rules not being flushed when BP is (de-)activated.

This is done because we move the "my achievements" pages away from the
author permalinks into the BP user profiles (or vice-versa) depending
on the new state of the plugin.

We aren't using BuddyPress' own (de-)activation hooks because of load
order problems.
Add missing phpdoc from previous commit (dpa_check_buddypress_is_active).

Antiprops paulgibbs :(