Neither are 'better' for history - and neither produces 'better' research. History simply does not work like that. Durham is harder to get into certainly - the nature of the surroundings there attracts historically minded people enabling them to raise their entry grades. Entry grades are not a reliable indication of the quality of academic staff working at an institution - they are really just an indication of the preconceptions of 17 year olds.
Research is not totally irrelevant at undergrad level, at least thematically - if a department has research centres in areas that you are interested in, then chances are they will offer some really interesting undergraduate courses that come out of that research. Warwick, for example, is really excellent for the history of medicine, Durham has strengths in medieval history and 17th century studies.
The RAE is flawed in that it tries to play different areas of research against each other, and is almost universally regarded, by all the academics I've spoken to at least, as totally unfit for purpose. Not to mention it being totally out of date at the moment.
In short op - go for the department that has the best course for you, that is a combination of interesting and diverse modules and assessment methods that suit you. Then weigh that up against how much you like the atmosphere of each university- the location, the accommodation and the department. For pity's sake ignore these ridiculous notions of 'prestige'.