r900: decode leak, fraud, and backflow status flags
r900: decode leak, fraud, and backflow status flags

TL;DR - this patch decodes the unknown2 and unknown4 fields into leak,
fraud, and backflow status information.

Pretty output now shows:

NoUse:$BIN BackFlow:$FLAG ... Leak:$BIN LeakNow:$FLAG

Where BackFlow is 0, 1, or 2 for no, low, or high backflow in past 35d;
LeakNow is 0, 1, or 2 for no, low, or high leak in the past 24h;
NoUse and Leak is a number from 0 through 6 representing the number of
days in the past 35 days for which either no use or a leak has occurred,
according to this table:

bucket  days
------  ----
0       0
1       1-2
2       3-7
3       8-14
4       15-21
5       22-34
6       35+

I sorted this out using public documentation such as
https://www.neptunetg.com/About/Case-Studies/Water/Westbank-Irrigation-District,-BC
which indicates that the utility can gather stats on days of no use and
days of leak in the past 35 days, and that it is divided into buckets as
shown in the table above.

Using this public information, intentionally triggering the leak flag in
my home, and listening to many meters over time led me to this decoding
of the unknown2 and unknown4 fields.
 
The 8 unknown2 bits seem to show days of no use and backflow information,
like this (? is still unknown, but this patch lumps it in with the bucket
number):
 
???BBBHL

BBB: bucket # for days of no use in past 35 days
H: high backflow in past 35 days
L: low backflow in past 35 days

Backflow seems to require some minimum frequency of occurrence before it
will set the flag.

Similarly, the 6 unknown4 bits look like this:

?BBBHL

BBB: bucket # for days of leak in past 35 days
H: continuous leak in past 24 hours
L: intermittent leak in past 24 hours

Intermittent leaks are described by Neptune in other public docs as:

"Intermittent leak indicates that water has been used for at
least 50 of the 96 15-minute intervals during a 24-hour period"

and a continuous leak indicates use in every 15-minute period over
the past 24h.

bemasher/rtlamr,curtiszimmerman/rtlamr,loverso/rtlamr-old,ejschaefer/rtlamr,bemasher/rtlamr,nbred/rtlamr,nbred/rtlamr,jomolinare/rtlamr