To optimize DPS on a Warlock, you're looking to get as much Charisma as possible, and take the Eldritch Blast cantrip along with the Agonizing Blast invocation. Of the races you've said you'd prefer, the Half-Elf is the best for this. With your level 4 ability score increase, this gets you to 20 Charisma straight off the bat.
The next thing I'd recommend would be to take the Hex spell to add an extra d6 to your attacks. This gives you a d10 + d6 + 5 attack while your Hex is active, and since it's a level 1 spell that lasts up to an hour you should have it for every fight.
This gives you your basic attack. Outside of that, Shatter is your go-to spell for AoE damage (the Warlock doesn't have many options in this area). If you're looking to improve your hit chance rather than directly boosting your damage, replacing Hex with the Darkness spell and the Devil's Sight invocation will get you advantage against most enemies.
As far as feats are concerned, there aren't many options that will improve your damage. Spell Sniper would let you ignore half and three-quarter cover, which may come in handy, but its other features don't help you much. Crossbow Expert will let you use Eldritch Blast while in melee without taking disadvantage, but doesn't give you anything else you're interested in. War Caster will help you maintain concentration, but more importantly, it will allow you to make opportunity attacks with your Eldritch Blast. That said, in order to get opportunity attacks you need to be in melee, which won't work well without Crossbow Expert.
So Crossbow Expert combined with War Caster will give you a powerful oportunity attack, but it requires 2 feats and you can't rely on getting opportunity attacks often. Crossbow Expert is still useful on its own so that your attacks don't suffer when an enemy gets into melee with you, but overall, you might be better off going with Moderately Armoured as you've planned.
Prioritize number of attacks and Feat combinations
Ok, a quick addendum before we go any further. There is no such thing as one perfect build for every situation. The environment you'll be fighting in, the type and number of opponents, and even the nature of the story you're engaged in can all change which characters are "best" suited. For example, a character who hits once but hits extremely hard (like a rogue) may have higher DPR (damage per round) than another, but against a horde of weak enemies (e.g. Goblins) they may find themselves less useful than their DPR would suggest they would be, since a large amount of their damage each round is wasted hurting an already dead enemy.
All that being said, I've done a bit of research and found that at this particular level, there is a build that will work very well in a lot of scenarios, and meets the criteria you've set (survivability and DPR without any other players' help) in a measurable way. So enough hedging: let's look at the details.
The Build
Stout Halfling (counterintuitive, but hear me out), Eldritch Knight Fighter 13, Rogue (or Wizard) 2
Str: 8
Dex: 20
Con: 16
Int: 14
Wis: 12
Cha: 8
AC: 18, 20 with Haste, up to 25 with cover
Feats: Sharpshooter, Crossbow Expert
Favored weapon: Hand crossbow
Favored Spells (in order of importance): Haste, Mage Armor, Shield, Find Familiar (or another 1st level Wizard spell), 7 more evocation or abjuration wizard spells of your choice (you'll rarely be casting them).
Rationale
In descending order of importance, the three factors you need for maximum ranged weapon damage dealing are:
- Multiple attacks
- Accuracy & Damage Bonus (about equal: both come from Dex)
- Base Damage (weapon's dice)
Multiple attacks are almost always the most important feature. A typical enemy in DnD will have an AC which can be hit on a natural 8 or better. So usually, an increase an increase in accuracy (say, the 2 point increase from the fighter's "archery" style) will grant you about a 16.666% overall boost in expected damage (hitting on 14/20 attacks rather than 12/20), while a boost in number of attacks will grant you at least a 20% boost in damage (going from 5 attacks to 6, which usually can only happen at 20th level anyway). Although enemies with particularly high AC may alter this math, on average multiple attacks will be of more benefit. That being said, we're going to get both as high as possible.
With all that in mind, you're going to want the following build:
- 13 levels in Eldritch Knight: 11 for 3 standard attacks. At level 13, trade in the spell you gained at 8th level for "Haste", and get another single weapon attack (4 per round total so far).
- At level 4, take crossbow expert feat. Now, according to sage advice (http://dnd.wizards.com/articles/features/sageadvice_feats), you will be able to use your bonus action for another hand crossbow attack. Although the hand crossbow has the lowest damage dice of the martial ranged weapons, this feat makes it the most damaging in most circumstances. (5 attacks per round by level 15).
- At level 6, take sharpshooter. Now, you can shoot your hand crossbow just as well up to 120 feet (and since most combat in a dungeon crawl happens within 100 feet, you're golden). Also, as long as your target's AC is less than 22, you always want to take the -5 to roll for +10 to damage (the average damage per round will be higher).
Your remaining two attribute increases should got to getting a 20 dexterity. So far we're up to: 5 attacks per round, expending nothing other than a 3rd level spell slot (2 per day available) and ammunition. Each attack does 1d6+15 damage, or 18.5 average damage per successful attack. That's (averaging out the rolls) a whopping 92.5 damage per round, without even using action surge! Even more amazingly, you could still be dealing an average 37 damage on a turn in which you are DODGING (haste action + bonus action attacks)!
Even without haste, we still could be doing an average of 74 damage per round (assuming all attacks hit) with the hand crossbow, expending no resources other than bolts.
For the final two levels, there are a couple of options; but probably the best one is to take two levels of Rogue. You'll get an extra 1d6 per round from sneak attack, and cunning action (which, although it would lose one weapon attack, would allow you to disengage, dash, or hide as a bonus action: it'll give you considerable versatility on the battle field, and allow you to easily keep your distance). Also, you could get expertise in stealth and acrobatics, which will be a huge boon if you're hoping to scout or hide in combat, or avoid being grappled. Our damage total (without action surge) is now up to 96 damage per round. If you wanted to Haste more often rather than do a bit more damage (and losing some battlefield mobility), you could take 2 levels in Wizard instead, allowing you 3 castings of haste automatically, and an Arcane Tradition (War Magic could fit nicely here, or Bladesinger if your DM allows it for a non-elven character. Warning: a DM may consider an attack with a hand crossbow to be using "two hands to attack with a weapon", which ends the bladesong. Check with them before choosing a subclass).
The Halfling's bonus to dexterity is essential, but you could get this from other races. A real benefit is the +1 bonus to constitution. It may not look like much, but this build is very much about maintaining the Haste, and has no attribute boosts to spare. If you take this build, DC 10 concentration saves (which is what most attacks will incur if they hit you; only attacks dealing 22 or more damage will up this difficulty) will only fail on a natural 1: and because of Halfling's "Lucky" trait, this means the standard concentration save will only fail 1 in 400 times. Also, the Halfling ability to move through the space of medium hostile creatures makes this build insanely mobile. If you went with 2 levels of Rogue, even if your character was completely surrounded by (medium sized) guards, you could Disengage (cunning action), Dash 45 feet (Haste dash action, speed doubled, five feet of difficult terrain for moving through an enemy's space), make three attacks (action), then move up to 50 feet more, all without incurring any opportunity attacks.
For your non-abjuration/evocation first level spell gained at level 3, I'd suggest Find Familiar (an Owl using the Help action in combat can be very useful). You should pick up Mage Armor right away at level 3. With mage armor and Haste activated, you'll have an AC of 20 (13+5 from dex+2 from Haste), before you even take cover (which you should be doing as much as possible as a ranged character). This will make your standard AC between 22 and 25. If you pick up Shield at level 5, you can even bring this up to 30 for a round, in REACTION to being hit (which could cancel the hit in question) at the expense of a first level spell slot.
There are other options that make for powerful ranged damage dealers at this level (Level 10 bard with swift quiver and heavy crossbows will fire 4 times per round, and ranger5/rogue* beats out fighter at most levels). But this build has a slight (or major) numerical advantage over all of them I've been able to calculate at precisely level 15. One last consideration: if you went Fighter 14, Rogue 1, you'd get the same max damage, lose the cunning action, and get access to one 3rd, 2nd, or 1st level Wizard spell of your choice. Mirror image alone might be worth this: but it all depends on how much flexibility you want on your turn. Personally, I'd go Rogue 2 (cunning action is fun and useful).
Best Answer
On speccing against undead
Without employing too much meta knowledge about the specific monsters of the adventure, we can use a bit of knowledge about undead to make decisions (which is probably justifiable as in-world knowledge too).
Your thought about bludgeoning damage isn't bad, but it's only skeletons which have a vulnerability to bludgeoning damage. A few undead (such as Shadows) have vulnerability to radiant damage, so grabbing that would be valuable. Doubly so, since very few undead are resistant (or immune) to radiant damage, so having it would be useful to have some consistent damage in the face of resistances to non-magical attacks. (On that note, you'll probably want to get a silvered weapon as soon as you can afford it, if not supplied with a magic weapon by then.) Conversely, necrotic and poison damage should be avoided in particular.
Barbarian zealotry
Accepting the above as showing that we want to lock into bludgeoning+radiant as our damage suite, we can start choosing things for our
ClericBarbarian. To get radiant damage, Path of the Zealot has Divine Fury:Path of the Zealot is also one of the few barbarian subclasses that add damage, and quickly the most linear for that. As Groody's answer mentions, Totem (Bear) would give you a lot more resilience, though with zealot you could rely on being cheap to revivify.
You're pretty open as to race, though Aasimar will get you some additional radiant damage, Orc or half-orc would offer some more damage on crits (see the notes for Brutal Critical), and variant human will be an option for picking up feats earlier.
Since polearms don't really come with bludgeoning damage (outside of the butt-end attack of Polearm Master) and the classic Greataxe even less so, we can look at two primary weapon choices: Maul and two-weapon fighting.
Modelling Damage
Rather than doing a full damage analysis, we can do a couple of simplifications and assumptions. Firstly, we'll only compare damage during rages. The accuracy of that will depend on your table and/or campaign, so it's not possible to get around it without some kind of assumption. Second, we assume a representative hit chance of 65%. The DPR can then be calculated as: $$ \text{DPR} = \sum_\text{attacks}\big[h (D+m) + cD\big] $$ where h is the hit chance, D is the die damage, m is the static modifier, and c is the crit chance (0.05 for normal attacks, 0.0975 with advantage).
For simplicity, I'll be dealing with a Strength mod of +4, and rage bonus of +2, and I'm ignoring Brutal Critical, and the Divine Fury damage. I'll get back to how these shift things afterwards. The relevant feats considered here are Great Weapon Master for the maul (ignoring the bonus action attacks) and Dual Wielder for the two-weapon mode.
Maul
Two-Weapon
As mentioned, there are a few things not considered in the above analysis.
Other than the feats, you don't actually have any major investment into one or the other, so you may well want to consider using two-weapon fighting during early levels and/or against high AC opponents, and switch to the Maul once you have Extra Attack and Great Weapon Master.
For more on two-weapon versus heavy weapon barbarians, see: How does the barbarian's bonus damage from Rage interact with two-weapon fighting?, Is dual-wielding superior to great weapons for a raging Barbarian?, Great Weapon Master vs. Dual Wielder for a half-orc Barbarian
Running the same analysis on Polearms we get:
Obviously, this means forgoing most of the bludgeoning damage (the relevance of which depends on how anti-skeletons you are) and it needs two feats locking you into v.human if you want to pump your Strength up to +5. You otherwise get kinda the best of both worlds when it comes to the damage discussed above; getting two-weapon fighting's efficiency on Divine fury and Brutal Critical.
If your group has a player planning on playing a Cleric, I would check in with them to make sure your character doesn't step on their turf thematically.