My first thought on this was, like most people's I suspect, "what on earth is he doing"? He's not in government, he voted against the measure, and his party line was against the extension (and only 1 Conservative MP  voted against that line). (If I'm reading from the right vote, all Lib Dems also voted against it, as did 36 Labour MPs).
My second thought, on hearing that Nick Clegg had agreed not to field a candidate against him, was "erm, WHAT? We should be fighting for every seat we can get!".
However, on further deliberation:
What other action could he have taken to make a forceful statement? He can't storm out of the government; he's not in it. He's made the biggest noise he can, drawn as much attention to the issue as he has power to, and basically called the government out. A senior political has said "this is intolerable" and it's drawn attention to what the government's playing at - illiberal behaviour, deliberately vague (and thereby draconian) laws, an ongoing invasion of privacy - and all purely on a populist (for Daily Mail values thereof) agenda with no real benefits to the country.
As for not standing against him, realistically, he'll only be "safe" until the next general election anyway; we'd probably (be made to) look like opportunists for trying to take the seat as his stand (on this issue) is genuinely liberal. And, to be honest, I doubt the LDs need the cost.
And, indeed, why shouldn't politicians of different parties agree with each other, or hold opinions distinct from their party leadership, on occasion? Party voting makes a complete mockery of democracy (well, OK, the UK political system does that anyway, but this is a particularly clear example), and the media's insistence on making everything a two-sided battle in which any independent thought (aka internal dissent) is "a clear weakness in the party leadership".
The BBC's (specifically Nick Robinson's) commentary on this has been bizarre. They're seeing it as "a gift to Labour - a real problem for Cameron". For goodness' sake... Cameron voted against 42 days; he didn't get consulted but the Tory party's not supposed to be a dictatorship, and he's backed Davis; Brown has been called out as beyond the pale, and the unpleasant bribes he offered the DUP have been drawn into the public eye. Davis is taking a bit of a risk, but Cameron can play this as showing that he has (well, had, but chances are he'll get his job back soon) men of principle in his shadow cabinet.
I still don't massively like or trust Cameron - he's better than Brown, although that's not saying a lot, but I might as well be fair to him.
As for Nick Clegg; well, I think he's probably done the right thing - for a while, the LD shave been trying to swing opinion (and increase dialogue) across parties as well as fight in the national vote, and this is a logical part of that process. Credit due, I think, for looking beyond partisanship.
Of course, there's still the question of how the electorate will respond; Robinson was talking about how they "tended to punish politicians who made them vote unnecessarily". My gut response to that was that the electorate need a sharp kick up the arse; we get few enough chances to vote anyway. But of course, the electorate in this case contain the zombie hordes of the Daily Mail, who will do their damnedest to tear apart anyone who can be seen to be "soft on terror". And the logic of Davis' action is subtle, and doesn't translate easily into soundbites.
 Ann Widdecombe apparently - draw your own conclusions; I have none.
 Yes, someone will complain that I'm patronising the electorate. However, far too many people quite naturally accept the worldview fed to them by their media-of-choice. Far from all, thankfully, but the effect and power of tabloid media is significant.