Even as Telegram faces legal scrutiny and grapples with billions in debt, it is set to be profitable for the first time as it tries cryptocurrencies, subscriptions and ads.