The military is trying to carve out a buffer zone inside Lebanon deep enough to put border communities beyond the militants’ reach.