ejabberd service

I've  applied commit from https://github.com/esl/MongooseIM/pull/87 and added changes requested by @lavrin.
I've tested it only with a simple component which was able to connect to Mongoose.