Balmerhon, what you said doesn't coincide with what I understood about state taxes, so I looked into it. It seems that you can stop paying MD taxes only if your domicile is established elsewhere.
Here's a link to a document about residency and domicile for MD: http://www.marylandtaxes.com/publications/bulletins/it/ar_it37.pdf
Important points: to establish domicile, you must be living in the place in which you intend to establish domicile and you must be intending to live there permenently.
This means that if you want to establish domicile in another state, you will have to move there with the intent to make that your permanent home.
The document also says that if you move to another country, you cannot make that your domicile if you have a limit on the amount of time you are allowed to stay there. I don't know if that would include any time- or situation- limited visa, or only those that would require that you return to the US at the end of the time period (i.e., excluding visas that can be extended while you are still staying in the UK, such as spouse/partner visas).
Edited to add: the document says "An individual who is required to leave a foreign country after a certain period of time, or upon the happening of a certain event, cannot establish a domicile in that country and, therefore, cannot effectuate a change of domicile."
I would take the "required to leave a foreign country" as the key. If you are on a spouse/partner visa, you are not required to leave the country at the end of the initial time period, as you can get an extension without having to leave. On the other hand, with a work permit, you do have to leave the country once the job is ended; you cannot apply for any other kind of visa from within the UK. But that's just me giving it a strict interpretation in my favor!