Plans to demolish a former listed building and replace it with eight homes have been approved by Horsham District Council.