Allow the use of closures for environment detection.

Currently you have to provide a hostname to determine which environment you're currently in. With this change you can also provide a closure in environment.php. 

Note: You can still provide an array. 

An example of a closure (which is also provided in the environment.php file)

```php
return function () {
    return getenv('APP_ENV') ?: 'local';
};
```

This gives the developer the flexibility to change the environment on the fly by setting the APP_ENV variable in the webserver configuration for nginx or apache.

```bash
fastcgi_param APP_ENV production; // nginx
SetEnv APP_ENV production // apache
```