It looks like the issue has already been fixed - at least partially: https://github.com/umbraco/Umbraco-CMS/commit/ac88da4188365b101debf0f3e9ad7ec7c300a898 for the upcoming 7.1.3 patch release.
I say partially because I think there are two issues here:
The exception you posted is around the CurrentUser, which won't exist when using the API. This issue hasn't been fixed yet.
The NotificationService which is used to send the notification requires an HttpContext because of some legacy code that is involved. This is fixed in the above commit, so the notification won't be sent if an HttpContext is not available.
But luckily there is a way around this in the code sample you provided. The Save-method in the ContentService has an overload to specify that the method should not raise events. When you don't raise events for a Save method the NotificationService won't be called and the exception won't occur. But of course it also means that no notification will be sent for the Content item you are creating from code using the API.
Example:
public class CreateContent : ApplicationEventHandler
{
protected override void ApplicationStarted(UmbracoApplicationBase umbracoApplication, ApplicationContext applicationContext)
{
var root = applicationContext.Services.ContentService.GetRootContent();
var content = applicationContext.Services.ContentService.CreateContent("Profile", -1, "umbTextPage");
applicationContext.Services.ContentService.Save(content, 0, false);
base.ApplicationStarted(umbracoApplication, applicationContext);
}
}
Notice that applicationContext.Services.ContentService.Save(content, 0, false);
contains two extra paramenters: 0 for the user id (zero is normally the admin user which is always present), and false for specifying that raiseEvents = false.
Using this approach should ensure that your code doesn't invoke the NotificationService, which then throws an exception.
Hope this helps!