Added basic tests and flagging permission access check

This patch provides:
- Basic tests (SimpleTests) for flagging functionality.
- Some code documentation where code was changed.
- Added function "hasActionAccess()" to \Drupal\flag\Entity\Flag (and to it's interface) and updated the flagging access permission in Drupal\flag\FlaggingAccessController, now using this new function. The old code did not check for this access permission correctly.
- Added function flag_entity_build_defaults_alter to prevent caching in basic test. Consider render caching.