A historic inn that was built to cater for railway workers is being marketed for sale