YOURLS Multi Domain

Recently I wanted to convert all my link shorteners to YOURLS which is a pretty awesome, easy to use link shortener. I could have easily setup YOURLS 8 times, but that felt unnecessary since all the files are static and all the data is stored in MySQL. So I modified the config to allow for multiple databases based on the domain it is being accessed from.