use ancestor queries for strong consistency

Reviewed in https://codereview.appspot.com/8671051/