3 large apples (peeled, cored, and sliced 1/8-inch thick, about 4 cups)
  juice of 1 lemon
1/4 teaspoon salt
1 cup (packed) brown sugar (divided)
2 tablespoons cornstarch
1/2 cup unbleached all-purpose flour
1/2 cup sweetened, shredded coconut
1/4 teaspoon baking powder
1/2 teaspoon ground cinnamon
1/4 teaspoon allspice
1/4 cup salted butter (1/2 stick cut into 8 pieces)
1 large egg (lightly beaten, divided)