Starting to convert strings to dictionaries
Move native host updating out of khan.js and into shared file
Use different method with more parameters for new communication pattern
Send object rather than string to updateNativeHost function
Add more updateNativeHostForVideo calls
Use new pattern to update host with action results
Use new pattern for logging
Use new pattern for signing out if web view learns that OAuth is expired

Summary:
This assumes that all web view communications starting with "khan" are meant to update the native host, and moves the update type into the scheme and the desired action into the path. This ensures that the action (the most important part of the URL!) has a prominent and formal place, so we aren't just taking actions depending on the presence of a certain key (which may be surrounded by its parameters as other keys).

Feedback on this pattern definitely welcome!

(last commit:
)

Test Plan: Update the iOS side to the forthcoming update, then log in and notice that you get points, can share the video, can download the video, and the console spews out logs as quickly as ever.

Reviewers: mgp, mattdrance

Subscribers: ben, alpert

Differential Revision: http://phabricator.khanacademy.org/D7760
Whitespace
Use different formal pattern to communicate between web view & objc

Summary:
This assumes that all web view communications starting with "khan" are meant to update the native host, and moves the update type into the scheme and the desired action into the path. This ensures that the action (the most important part of the URL!) has a prominent and formal place, so we aren't just taking actions depending on the presence of a certain key (which may be surrounded by its parameters as other keys).

Feedback on this pattern definitely welcome!

(last commit:
Use new pattern for signing out if web view learns that OAuth is expired
)

Test Plan: Update the iOS side to the forthcoming update, then log in and notice that you get points, can share the video, can download the video, and the console spews out logs as quickly as ever.

Reviewers: mattdrance, mgp

Reviewed By: mgp

Subscribers: marcos, ben, alpert

Differential Revision: http://phabricator.khanacademy.org/D7760