Implementation of /similarity REST endpoint

I think the function could compute the norms here rather than need them given as an arg? likewise for the number of items -- that's the list size.