Skeleta in non-Archimedean and tropical geometry