Anti-harassment law could hasten ‘erasure’ of pubs, says Conservative peer