Greeting: "Cold enough for you?"
Such utterances are known as phatic. In the OED's definition, they 'serve to establish or maintain social relationships rather than to impart information, communicate ideas.' Exchanges about the weather, such as you describe, can made without a greeting such as 'Hello' or 'Good morning' and often occur between strangers.
Such statements are usually considered conversation starters/openers:
A conversation opener is an introduction used to begin a conversation. They are frequently the subject of guides and seminars on how to make friends and/or meet people. Different situations may call for different openers (e.g. approaching a stranger on the street versus meeting them at a more structured gathering of people with like interests).
An opener often takes the form of an open-ended question, which can lead to further comments or conversation as well as creating topics for future conversations (e.g. "How's your mandrill doing?").
A closed-ended question (e.g. "Nice weather today, isn't it?") is regarded as potentially less effective because it can be answered with a simple "Mm-hmm," which is essentially a conversational dead end, requiring the initiater of the conversation to start from scratch.
I suppose that in -32°C conditions, it might be apt to call them ice-breakers instead.
In one of Terry Pratchett's children's books, a computer that - unlike the nomes[sic] that are the main characters - understand human speech, explains that a conversation it overheard consisted of "I am still alive. Are you still alive?" "Yes, I am still alive". This seems foolish to the nomes until they realise that most of their conversations consist of that too.
Even conversations we have that do have an actual subject or objective can also serve the rôle of strengthening social relationships along with the main goal. Indeed, they often do a better job, but meaningful or purposeful topics of conversation aren't always available to us. Hence we make do with essentially saying nothing, so that we still have the social benefit. Neither you nor your neighbour were likely to be in any doubt as to whether it was cold, nor was it likely that either of you had failed to realise it yet.
I would suggest that the real message conveyed wasn't "hello, how are you?", or "I am cold" but:
"Hello, I am your neighbour, who you know. I am part of the group of people that you know!"
"I agree! You are my neighbour, who is part of the group of people that I know. Likewise, I am known to you!".
It's an important message to convey, considering that we're social animals, and there's no longer the same practical side-effect to picking nits out of each others' fur.
Weather is particularly useful in countries with changeable weather, because it always offers an opportunity. It may lead to a longer conversation, but if not it can stand by itself.*
Rather than this being a greeting, it's more that greetings are a form of this. Outside of a small set of situations in which we meet strangers in situations in which we must judge if they are a threat or if either of us are in urgent need of aid, then there is no practical need for a greeting. We say "hello" when we are not peering out to each other across the sea, or unsure as to each other's identity. There is little or no information conveyed in the actual wording itself. It's job is to make a temporary social connection, whether as part of a long-standing social relationship, or just for the duration of a brief conversation that follows.
*The alternative explanation is that the British and Irish are actually a Mediterranean people living in the wrong place. This would explain many of the traits we share, not least the shock tinged with moral outrage with which we can exclaim "it's raining!", as if such a thing was never known in our green and pleasant lands.