The OED2 has separate entries with different etymologies for all of these.
Frog1: the amphibian, from the Old English frogga
Frog2: elastic, horny substance growing in a horse’s hoof, unknown origin, perhaps a folk etymology of the Italian name for it, forchetta, or of the French fourchette
Frog3: the ornamental, looped fastener for a sword or other device, unknown origin, perhaps from the Portuguese froco
Frog4: the railroad device, no etymology given