A 19th-century chapel in Hackney that was most recently used as a women-only gym is to receive a new lease of life