Provides a common way to determine current affiliate.

#### What's this PR do?
- Provides a common way to determine current affiliate

#### Any background context you want to provide?
Determines the affiliate code from settings.php path, e.g. sites/uk/settings.php:
- botswana
- canada
- congo
- default
- ghana
- indonesia
- kenya
- nigeria
- training

#### What are the relevant tickets?
#3242 
Clarified with @desmondmorris, it will work.