I highly recommend a handgun to serve both your requirements. The simple reason is that it's much easier to defend small quarters such as a home when holding a handgun. With practice you can shoot it with one hand and still get decent accuracy at short ranges. A rifle/shotgun is certainly fun on a range, however, for home defense, they are a little more work to manipulate compared to a handgun. A .223 chambered AR15 definitely has the capability to penetrate walls which is something to consider when living with neighbors so close to you.
My recommendation is a 9mm or .40 caliber, but since this is your first gun, lean more towards a 9.
No, they will not give you the stopping power of a .45, but they have an advantage in that they can hold more rounds in the magazine compared to a .45 without getting into fancy hi-cap magazines.
It's also cheaper to buy 9 and .40 ammo compared to the .45 for those times when you want to take the handgun plinking.
As far as which manufacturer to purchase, let your hand make the decision. Ergonomics is very important. The handgun should have a very natural feel when you aim, so try different types.
Happy hunting.