The explanation after 2. cannot be quite right, as the consonant is
geminated also without the preposition: hammelek
I would prefer to explain the gemination as replacing an original
consonant. Thus perhaps the Hebrew article was originally hal- (cf
Arabic al-). Thus the process is e.g.
*hal-melek -> hammelek
*l-hal-melek -> *l-hammelek -> lammelek BUT
*w-hal-melek -> *w-hammelek -> wehammelek (h not elided)
i.e. h is elided after p as after b,k,l, but perhaps we are left with
an aspirated p (written as ph, the h should be superscripted) which
later shifted to w, in distinction to other p's which remained p or
shifted to f. That's a slightly different phonetic explanation to
Galia's but on the same sort of lines. (I don't buy the suggestion
that p -> f counts as a double shift as it occurs in many languages,
presumably because a labio-dental plosive is impossible if you have
gapped teeth and bilabial fricatives are rare and hard to pronounce).
I don't know if any of this is provable, but it is more what I was
thinking concerning the article.