Yes, the moves that can hit you have changed over time:
- In Generation I, Bide, Swift and Transform were all able to connect (however, starting with Pokémon Stadium, Bide lost this ability again).
- Generation II replaces this list with Gust, Thunder, Twister and Whirlwind. Additionally, Gust and Twister do double damage against a flying opponent, and any move can hit if Lock-On or Mind Reader was used the previous turn.
- Generation III adds Sky Uppercut to the list of unavoidable moves.
- Generation IV lets all Pokémon with the No Guard ability hit a flying Pokémon with any move.
Presumably, the Generation I list was actually a bug which caused the "semi-invulnerable" check to get skipped (with Bide getting fixed for Stadium); the list used for Generation II and on were selected because it makes sense that these moves can still hit while the opponent is flying.
In Gen III it added +1 happiness to positive happiness events. However, in Gen IV and V the Soothe Bell multiplies happiness gains by 1.5x (rounding down), not 2x. It would appear that "rounding down" is a key part of the equation, as, from what information I can find, happiness appears to be an integer value. A number without a fractional or decimal component.
So, while in theory the soothe bell should reward you with 1.5 happiness for every 256 steps, in practice that .5 is being rounded down. Additionally, it is +1 happiness for every 256 steps, not 0.00390625 happiness for every step. So in all likelihood, in your example, those 40,000 steps have only provided you their base +156 points of happiness.
EDIT: Forgot base Happiness; 70 for Riolu, which means, the total would be 147*256= 37,632 steps. Which you've more than passed. Have you leveled the Riolu at all? Pokemon that evolve through happiness still need to gain at least one level to trigger their evolution. It doesn't occur solely after the happiness threshold has been passed.
The Friendship page of Bulbapedia has a handy chart for Pokémon happiness events. There are three ways in Sinnoh to gauge a Pokémon's happiness; The Pokétch app Friendship Checker, Dr. Footstep on the left side of Route 213, Or a female NPC in the back of the Pokémon Fan-club in Hearthome City
Although perhaps not entirely relevant to your question, as your Riolu was hatched, Pokémon caught with a Luxury Ball receive additional happiness from leveling up and walking. This bonus stacks with the soothe bell.
Best Answer
The pokerus is applied after the battle, when the EV are already distributed. Therefore, it won't gain additional EV from this battle.