Save algorithm for fetch prompt to appearance.

In order to have a good understanding of how a prompt came to be selected for a
user, we want to know which algorithm was used to select the prompt. Currently,
we only have the catchup and simple-random algorithms.

[#67580252]
move location where we set prompt.algorithm

Instead of putting assigning it in choose_prompt(), set it in each individual
algorithm's method. IOW, it's the algorithm's responsibility to tell us their
name.

[#67580252]
Merge branch 'master' into record-prompt-algo
Switch to storing JSON in algorithm column.

This allows us to support arbitrary data structures to support any data like
parameters used for the algorithm or anything else we might want to store.
Update tests to account for JSON data for algo.
fix algorithm JSON test for good this time
Separate algorithm data into two columns.

Algorithm information gets saved to the appearances table in algorithm_name and
algorithm_metadata.
add check for nil prompt
upgrade airbrake
Merge branch 'master' into record-prompt-algo
Merge branch 'airbrake-upgrade' into record-prompt-algo
Merge branch 'record-prompt-algo'