Hi Tim,
Sorry about the delay in getting back to you...
Demeurer as your rightly point out is an odd one as it doesn't really fit into the usual transitive and intransitive category of verbs which take avoir or être.
However, it does mean two different things and use both auxiliaries depending on its meaning.
Maybe a better way of thinking about it is :
When the verb demeurer describes a state it will take 'être' and when it describes an action, it will take 'avoir'.
However, this is just a particularity of that verb and there is no need to sweat over as you will often use other verbs to describe the same meaning, rester in the case of the state of being ,
Je suis demeuré/resté bouche bée = I stayed open mouthed
and vivre/habiter for the action,
Nous avons demeuré/vécu/habité rue St Martin pendant dix ans = We lived in Rue St Martin for ten years
You will find exceptions to all rules so this is very perceptive of you...'Vivre' is the same , intransitive but takes 'avoir'
J'ai vécu = I have lived
Hope this helps!