Implement expiry in protect()

This patch implements a way to set the duration of protection, like
that in block().

Change-Id: I4981f4f094c082ce75ae2973b581bdc3063b10ee
Merge "Implement expiry in protect()"