Finish porting shadow.ml to ctypes

Signed-off-by: Mike McClurg <mike.mcclurg@citrix.com>