text: Title: skeletonize_3d feature request: numpy.pad "mode" parameter
  Body: Hello everyone,
  
  I'm currently working on a project involving skeletonizing elongated vessel-like shapes as a way to recover their center line. The thing is, many of these vessels get cut by the border of the image. I'm usually working with 3d images, but I'll provide a simpler 2d example here.
  
  ## The issue:
  With current padding of the numpy.pad function ('constant' mode, the skeletonize_3d give results that generally do not correspond to my expectations at the borders. The major issue being that most of the time, the skeleton does not reach the borders. I would like to be able to select different modes (in my case, 'edge' mode in particular) as the results can differ quiet a lot.
  
  ## Request:
  So, is it possible to add such parameter?
  Otherwise, can I used a modified version of the library? (does the BSD-3-Clause permit such usage, given that we do not have any commercial objective).
  
  ## Illustration:
  Please find below a plot of a simple elongated tube, being cut by the borders with both a low and high incidence angle. As mentioned earlier, both results present different behavior at the border. The current result is the middle image whereas I would like to have the one at the right.
  
  ![image](https://github.com/scikit-image/scikit-image/assets/65400909/6c0f7e9a-be94-402a-a6f0-b14ce9b15450)
  
  ## Code for reproducing the results:
  In order to obtain this plot, I had to modify skeletonize_3d the following way:
  **Line 575**:
  `def skeletonize_3d(image):`
  to
  `def skeletonize_3d(image, mode='constant'):`
  
  **Line 628**:
  `image_o = np.pad(image_o, pad_width=1, mode='constant')`
  to
  `image_o = np.pad(image_o, pad_width=1, mode=mode)`
  
  Here is my script used as well:
  
  ```python
  import matplotlib.pyplot as plt
  import numpy as np
  from skimage.morphology import skeletonize_3d
  from skimage.io import imread
  
  img = imread('test_skeletonize.png', as_gray=True).astype('uint8')
  
  res_const = skeletonize_3d(img)
  res_edge  = skeletonize_3d(img, mode='edge')
  
  fig, ax = plt.subplots(1,3, figsize=(10,10))
  ax[0].imshow(img, cmap='Greys')
  ax[1].imshow(img-res_const, cmap='Greys')
  ax[2].imshow(img-res_edge, cmap='Greys')
  
  ax[0].set_title(label='Original image')
  ax[1].set_title(label='Result with constant mode')
  ax[2].set_title(label='Result with edge mode')
  
  plt.show()
  ```
  
  ## End word:
  I'm not really used to the development community, so if anything is wrong with this ticket, please let me know.
  Best Regard