With the screw threads around the top it looks like it had a metal screw top lid that went over the stopper.
Looks like some sort of apothecary bottle.
It is an aqua regia vile. Aqua regia is made from nitric and hydrochloric asid and is used to disolve precious metals amoung other things. The double cap keeps it from spilling. There are other things it could be used for but being a jeweler that was the first to come to mind.[]
This one is similar. I was told that the cap kept the stopper in place so that the country doctor wouldn't spill the contents when he rode a horse to see patients. I was also told the metal cap was a dose cup. Hope that helps. Couldn't tell you if it's true or not though.