localbugfix: refactor into general operations

The operations in bin_local amounted to intesection and difference of
local policies. Pull them out, name them, and use them.