Reinstate moai callbacks when app is resumed, backgrounded or started. Also attempt to add termination but it doesn't really work