Added parameter to to inventory::amount_of that determines if one attempts to use items as tools or as components

Added wrapper function inventory::has_tools and inventory::has_components

Add PSEUDO tag to items that are only temporarily created for the crafting inventory.
move amount_of logic into item class
fix check for non-empty in item::amount_of
optimize the contents empty check
Merge pull request #6234 from BevapDin/fix-something

Prevent usage of pseudo items from vehicle parts