Why does telling an app to quit sometimes leave a zombie, and how can I kill it?
It seems like you have found a solution to your problem, but in case others are looking for more tools for their Unix-y toolbelt, here are a few:

quit

I have kept Jon Stovell’s  shell script quit (direct download link) around for several years now, and it seems to do a very good job of quitting apps. It tries a variety of methods, and will try to allow an app to ”save changes” if necessary. 

appswitch

Another very useful tool is Nicholas Riley’s appswitch (GitHub page) which will let you do a whole slew of things to apps, including quitting them (or hiding them, or showing their windows but not making them active, etc).

pkill

killall has already been mentioned, but I’d be remiss if I didn’t add that you could also use:

pkill -x Calculator

to get rid of the pesky app. I haven’t seen “dock zombies” so I can’t so whether or not that would fix the problem, but if it does, it might be preferable to two sudo commands.

A note about open

You mentioned that you are launching the app with open and then using AppleScript to hide it. Well-behaved apps should be respond to the -j flag to open to accomplish this without AppleScript, i.e.:

open -j -a Calculator

(see man open for details, such as "-j  Launches the app hidden"; not to be confused with -g which means "Do not bring the application to the foreground." I can never remember which is which so I almost always use open -g -j -a Foo whenever I want to launch an app but not have it steal focus.)