Intrinsic and extrinsic determinants of ion channel localization in neurons