WH Smith has agreed to sell its UK high street chain to Hobbycraft owner Modella Capital, valuing it at £76 million.