British soldiers have long been know as Tommies because when pay books were 1st issued in 1812 during the Peninsula campaign, soldiers were shown an example pay book in the name shown below:
Private Thomas (Tommy) Atkins of the Grenadiers. Hence a "tommy".
Cockney rhyming slang for male masturbation. ie. "Tommy Tank" = "Wank". Named after the british children's television program, "Thomas The Tank Engine".