Nexus 5 is manufactured by LG, but the official... producer, distributor is Google. So, as in the case of previous Nexus phones, the support will be available for longer time. M8 is totally new phone with fantastic look and camera. Unfortunately, none of those phone are water- and dustproof.
You can also take M8, then sell it and buy Nexus on e-Bay. M8 is still a bit expensive, so you will gain some money :P
Sony Ericsson K750i (with W800i software)
Samsung Omnia i900 (ock Eclipse ROM)
HTC Desire Z (New ROM every day )
Please hit "Thanks!" button if my hints were helpful.
I am from Poland, so my English is not perfect.