Engineering E. coli for magnetic control and the spatial localization of functions