For most <1 day outages, a simple USB power-bank with passthrough capability (output whilst also possibly charging) will happily keep the pi going, but without some frankenbodging there's no 'power lost' signal that the pi can sense. I've idly toyed with the idea of a phototransistor on the powerbank status LED and an attiny or something.
Now that I think about it, there was someone trying to make a supercap idea, but I don't think it went anywhere: https://www.indiegogo.com/projects/juice4halt-supercapacitor...