unread: Replace object with Map; fix a whole bunch of type errors.
unread: Replace object with Map; fix a whole bunch of type errors.

I lost count of the lies that this code turned out to be telling about
its types.  Both `UnreadStream` and `UnreadTopic` omitted properties
that were there in the real objects.

The root cause of that is that we didn't have working type-checking,
because we were defeating it with `Array#reduce`, `Object.values`,
and oh yes a fixme.  Plus a series of `any` types where it would have
been far better from the beginning to just not mention a type and let
the type-checker infer what it can.

Fix all that, by replacing `reduce` with `forEach` and replacing the
use of an `Object` as a map with a `Map` for the map.

Now you can find out the real types by just hovering over `totals`
to see what Flow has inferred.

Et voilà -- the file can now be marked strict-local.

vishwesh3/zulip-mobile,vishwesh3/zulip-mobile,vishwesh3/zulip-mobile,vishwesh3/zulip-mobile