Sorry to hear about your cat killing your other bearded dragon. Have to make sure the lids are very secure when cats are around (or just keep them out of the room, if the lizards can be kept in a separate room).
Your remaining bearded dragon doesn't need another friend to live in the cage. They are solitary and are better off kept separate. The leaning against the cage and scratching is normal bearded dragon behavior, many do this even in large enclosures. They see the reflection of their cage, behind them, and think they can go forward. Eventually they figure out they can't.
The 'stacking' of bearded dragons is done not because the dragons like to be sitting ontop of eachother but because they are both trying to bask in the same location and most often, the 'bottom' bearded dragon is the submissive one, being dominated by the one on top and also isn't getting enough heat/light because it is being shaded by the dragon ontop of it. The arm waving and head bobbing is all part of the domination/submission behavior of bearded dragons, smaller or more timid dragons will arm wave when a more dominating dragon is nearby. During mating, females often use the arm waving for the same reasons, or to show willingness to mate with the male (or to show she isn't another male and wants the male to know she is a 'her' and not to attack her as a male would a rival male).
All that said, dragons who are used to having another around the cage may feel a bit of separation anxiety for a few weeks after the other is gone. This is normal and will go away. Adding a new dragon won't solve this problem at all. The new one may not get along with your current dragon, you may wind up with two males or a male and female and this just leads to problems later on, requiring separate cages anyway. Two females do generally get along but there is no guarentee one won't decide to attack the other one day. However, once you have two adult dragons in teh same cage, that cage does need to be at least 5'x2'x2' in size with a foot added in floor space, per additional dragon. Other reasons why it's not good to house multiple dragons is health. For any health issue, be it parasites, respiratory infections etc, then instead of treating just one dragon, you have to treat them all, as even if one doesn't show signs there is a very high probability she will show symtoms anyway and if it's staggered enough, the second one getting sick, can reinfect the recently treated one...and vise versa, making it that much harder to keep them healthy. So treatment cost will always be twice as much as you will have to treat both at the same time to be save.