Plans to convert parts of a listed Bacup town centre pub dating back more than 175 years into flats have been given the go ahead.