A. Rotom-W is commonly used as a specially defensive Pokemon, but it's not exactly a good wall because its HP is too low (I'm talking about wall in the sense of Bronzong, Blissey or Dusclops). Normally, you wouldn't EV train a Pokemon in both defences, but instead EV train it in HP & either Def or Sp. Def. The EVs invested in HP would allow it greater chance to survive hits, and since Rotom-W has access to Will-O-Wisp (which will cause the drop in your opponent's attack), it's commonly made specially defensive. Also, most of the common grass moves are special attacks as well.
Rotom-W @ Leftovers
Ability: Levitate
EVs: 252 HP, 244 Sp. Def, 12 Sp. Atk
Nature: Calm (is best)
- Pain Split
- Will-O-Wisp
- Volt Switch
- Hydro Pump
Rotom-W is commonly paired with Scizor, as both of them can take each other's only weakness. Rotom-W can also take the Water & Ground hits, since Scizor is too frail to wall neutral hits.
B. yes, Rotom-W would make a good sweeper, especially if given Choice Scarf in order to maximise speed. Choice Specs are another option, but personally I agree that Rotom-W is too slow, so use Choice Scarf to maximise speed, as it already has a pretty decent special attack.
Rotom-W @ Choice Scarf
Ability: Levitate
EVs: 252 Sp. Atk, 252 Speed
Nature: Timid/ Modest (would be best)
- Hydro Pump
- Volt Switch
- Thunderbolt
- Trick
Hydro Pump & Thunderbolt are good STAB moves, Volt Switch is there to scout & escape, and Trick is to mess up your opponent's set. Particularly good if you manage to catch Blissey or a set up Pokemon like Forretress.
Conclusion: Rotom-W can serve both purposes well, with an excellent typing and coverage. It'd depend on the rest of your team which of those roles you'll choose for it.